2023-09-12 21:53:10 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
#
|
|
|
|
# This file is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
# your option) any later version.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this file. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
set -e
|
|
|
|
|
2023-10-03 14:41:31 +02:00
|
|
|
report()
|
|
|
|
{
|
|
|
|
ret=$?
|
|
|
|
message="$@"
|
|
|
|
|
|
|
|
if [ ${ret} -eq 0 ] ; then
|
|
|
|
echo "[ OK ] ${message}"
|
|
|
|
else
|
|
|
|
echo "[ !! ] ${message} failed"
|
|
|
|
exit ${ret}
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
echo ';;L;*' | sfdisk -f /dev/vda ; report "Resizing /dev/vda1 partition" ; \
|
|
|
|
partprobe
|
|
|
|
resize2fs /dev/vda1 ; report "Growing /dev/vda1 filesystem"
|
|
|
|
|
|
|
|
certbot certonly --standalone -d DOMAIN -m LETSENCRYPT_EMAIL ; report "Obtaining Lets's Encrypt certificate"
|
|
|
|
herd restart mumble-server ; report "Restarting Mumble server"
|
|
|
|
herd restart nginx ; report "Restarting Nginx server"
|