first-boot.sh: resize filesystem and add better status reporting.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
bd5799967f
commit
49c9a6f0ee
|
@ -11,6 +11,23 @@
|
|||
# along with this file. If not, see <http://www.gnu.org/licenses/>.
|
||||
set -e
|
||||
|
||||
certbot certonly --standalone -d DOMAIN -m LETSENCRYPT_EMAIL
|
||||
herd restart mumble-server
|
||||
herd restart nginx
|
||||
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"
|
||||
|
|
Loading…
Reference in New Issue