More retries

This commit is contained in:
Bob Mottram 2018-02-12 10:52:20 +00:00
parent 89e797a6e8
commit 580f229333
1 changed files with 17 additions and 12 deletions

View File

@ -255,21 +255,26 @@ function install_bdsmail {
chmod +x /usr/bin/bdsmail_domain chmod +x /usr/bin/bdsmail_domain
# wait for domain to be generated by the daemon # wait for domain to be generated by the daemon
echo $'Waiting for i2p domain to be generated...' # This can take a while, probably because i2p is connecting
sleep 15 bds_domain=
bds_domain=$(bdsmail_domain) sleep_ctr=0
if [ ! $bds_domain ]; then while [ ! $bds_domain ]; do
echo $'Waiting...' echo $"Waiting for i2p domain to be generated ${sleep_ctr}/30"
systemctl restart bdsmail systemctl restart bdsmail
sleep 15 sleep 10
bds_domain=$(bdsmail_domain) bds_domain=$(bdsmail_domain)
if [ ! $bds_domain ]; then sleep_ctr=$((sleep_ctr + 1))
#systemctl stop bdsmail if [ $sleep_ctr -gt 30 ]; then
#systemctl disable bdsmail break
#remove_i2p
echo $'Failed to get the bdsmail domain'
exit 8934638
fi fi
done
if [ ! $bds_domain ]; then
#systemctl stop bdsmail
#systemctl disable bdsmail
#remove_i2p
echo $'Failed to get the bdsmail domain'
exit 8934638
fi fi
# Create mutt configuration # Create mutt configuration