From 8304c7f2e87ff0dd34643bfcaeb781483bcda448 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 16 May 2017 21:26:24 +0100 Subject: [PATCH] If profanity is installed then remove it when xmpp is removed --- src/freedombone-app-profanity | 10 ++++++---- src/freedombone-app-xmpp | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/freedombone-app-profanity b/src/freedombone-app-profanity index 394d71c4..4615cfa1 100755 --- a/src/freedombone-app-profanity +++ b/src/freedombone-app-profanity @@ -174,11 +174,13 @@ function restore_remote_profanity { } function remove_profanity { - cd $INSTALL_DIR/profanity - make uninstall + if [ -f /usr/local/bin/profanity ]; then + cd $INSTALL_DIR/profanity + make uninstall - remove_completion_param install_profanity - sed -i '/profanity/d' $COMPLETION_FILE + remove_completion_param install_profanity + sed -i '/profanity/d' $COMPLETION_FILE + fi } function install_profanity { diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 4de5eede..d84c0dcc 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -493,6 +493,7 @@ function configure_firewall_for_xmpp { } function remove_xmpp { + remove_profanity firewall_remove 5222 tcp firewall_remove 5223 tcp firewall_remove 5269 tcp