Better handling of install failure

This commit is contained in:
Bob Mottram 2018-02-11 22:34:17 +00:00
parent 81810058a9
commit bb18a8c9be
1 changed files with 5 additions and 1 deletions

View File

@ -239,7 +239,7 @@ function install_bdsmail {
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/bdsmail.service
systemctl enable bdsmail
chown -R bdsmail:bdsmail /etc/bdsmail
systemctl restart bdsmail
systemctl start bdsmail
echo '#!/usr/bin/env python2' > /etc/bdsmail/get_address
echo 'import base64, hashlib, sys' >> /etc/bdsmail/get_address
@ -257,10 +257,14 @@ function install_bdsmail {
sleep 15
bds_domain=$(bdsmail_domain)
if [ ! $bds_domain ]; then
echo $'Waiting...'
sleep 15
bds_domain=$(bdsmail_domain)
if [ ! $bds_domain ]; then
echo $'Failed to get the bdsmail domain'
systemctl stop bdsmail
systemctl disable bdsmail
remove_i2p
exit 8934638
fi
fi