From 35894edacfd6d4ef436de88f469f0a8978cb78a0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 10 Jul 2016 15:20:52 +0100 Subject: [PATCH] Get domain when removing hubzilla --- src/freedombone-app-hubzilla | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedombone-app-hubzilla b/src/freedombone-app-hubzilla index a45f084b..093da292 100755 --- a/src/freedombone-app-hubzilla +++ b/src/freedombone-app-hubzilla @@ -141,9 +141,11 @@ function restore_remote_hubzilla { } function remove_hubzilla { - if ! grep -Fxq "install_hubzilla" $COMPLETION_FILE; then + if ! grep -Fxq "Hubzilla domain" $COMPLETION_FILE; then return fi + echo $'Removing Hubzilla' + HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}') nginx_dissite $HUBZILLA_DOMAIN_NAME if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then rm -rf /var/www/$HUBZILLA_DOMAIN_NAME @@ -157,6 +159,7 @@ function remove_hubzilla { remove_onion_service hubzilla ${HUBZILLA_ONION_PORT} sed -i '/install_hubzilla/d' $COMPLETION_FILE sed -i '/Hubzilla /d' $COMPLETION_FILE + echo $'Hubzilla was removed' } function install_hubzilla {