Bob Mottram 7 年之前
父節點
當前提交
8b272df109
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. 6
    1
      src/freedombone-app-bdsmail

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

@@ -248,6 +248,9 @@ function remove_bdsmail {
248 248
     rm /usr/bin/bdsmail_domain
249 249
     sed -i '/bdsmail_distribute/d' /etc/crontab
250 250
     rm /usr/bin/bdsmail_distribute
251
+    if [ -f /etc/skel/.mutt/bdsmail ]; then
252
+        rm /etc/skel/.mutt/bdsmail
253
+    fi
251 254
 }
252 255
 
253 256
 function install_bdsmail {
@@ -387,7 +390,9 @@ function install_bdsmail {
387 390
     $BDSMAIL_DIR/bin/mailtool $BDSMAIL_DIR/config.ini admin $BDSMAIL_DIR/Maildir/i2p/admin "$bdsmail_admin_password"
388 391
 
389 392
     # Create mutt configuration
390
-    mkdir /etc/skel/.mutt
393
+    if [ ! -d /etc/skel/.mutt ]; then
394
+        mkdir /etc/skel/.mutt
395
+    fi
391 396
     echo 'set mbox_type=Maildir' > /etc/skel/.mutt/bdsmail
392 397
     echo "set smtp_url=smtp://admin:${bdsmail_admin_password}@127.0.0.1:$I2P_SMTP_PORT/" >> /etc/skel/.mutt/bdsmail
393 398
     echo 'set use_from=yes' >> /etc/skel/.mutt/bdsmail