瀏覽代碼

Better handling of install failure

Bob Mottram 7 年之前
父節點
當前提交
bb18a8c9be
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/freedombone-app-bdsmail

+ 5
- 1
src/freedombone-app-bdsmail 查看文件

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