Browse Source

Better handling of install failure

Bob Mottram 7 years ago
parent
commit
bb18a8c9be
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/freedombone-app-bdsmail

+ 5
- 1
src/freedombone-app-bdsmail View File

239
     echo 'WantedBy=multi-user.target' >> /etc/systemd/system/bdsmail.service
239
     echo 'WantedBy=multi-user.target' >> /etc/systemd/system/bdsmail.service
240
     systemctl enable bdsmail
240
     systemctl enable bdsmail
241
     chown -R bdsmail:bdsmail /etc/bdsmail
241
     chown -R bdsmail:bdsmail /etc/bdsmail
242
-    systemctl restart bdsmail
242
+    systemctl start bdsmail
243
 
243
 
244
     echo '#!/usr/bin/env python2' > /etc/bdsmail/get_address
244
     echo '#!/usr/bin/env python2' > /etc/bdsmail/get_address
245
     echo 'import base64, hashlib, sys' >> /etc/bdsmail/get_address
245
     echo 'import base64, hashlib, sys' >> /etc/bdsmail/get_address
257
     sleep 15
257
     sleep 15
258
     bds_domain=$(bdsmail_domain)
258
     bds_domain=$(bdsmail_domain)
259
     if [ ! $bds_domain ]; then
259
     if [ ! $bds_domain ]; then
260
+        echo $'Waiting...'
260
         sleep 15
261
         sleep 15
261
         bds_domain=$(bdsmail_domain)
262
         bds_domain=$(bdsmail_domain)
262
         if [ ! $bds_domain ]; then
263
         if [ ! $bds_domain ]; then
263
             echo $'Failed to get the bdsmail domain'
264
             echo $'Failed to get the bdsmail domain'
265
+            systemctl stop bdsmail
266
+            systemctl disable bdsmail
267
+            remove_i2p
264
             exit 8934638
268
             exit 8934638
265
         fi
269
         fi
266
     fi
270
     fi