浏览代码

If profanity is installed then remove it when xmpp is removed

Bob Mottram 8 年前
父节点
当前提交
8304c7f2e8
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. 6
    4
      src/freedombone-app-profanity
  2. 1
    0
      src/freedombone-app-xmpp

+ 6
- 4
src/freedombone-app-profanity 查看文件

@@ -174,11 +174,13 @@ function restore_remote_profanity {
174 174
 }
175 175
 
176 176
 function remove_profanity {
177
-    cd $INSTALL_DIR/profanity
178
-    make uninstall
177
+    if [ -f /usr/local/bin/profanity ]; then
178
+        cd $INSTALL_DIR/profanity
179
+        make uninstall
179 180
 
180
-    remove_completion_param install_profanity
181
-    sed -i '/profanity/d' $COMPLETION_FILE
181
+        remove_completion_param install_profanity
182
+        sed -i '/profanity/d' $COMPLETION_FILE
183
+    fi
182 184
 }
183 185
 
184 186
 function install_profanity {

+ 1
- 0
src/freedombone-app-xmpp 查看文件

@@ -493,6 +493,7 @@ function configure_firewall_for_xmpp {
493 493
 }
494 494
 
495 495
 function remove_xmpp {
496
+    remove_profanity
496 497
     firewall_remove 5222 tcp
497 498
     firewall_remove 5223 tcp
498 499
     firewall_remove 5269 tcp