Get domain when removing hubzilla

This commit is contained in:
Bob Mottram 2016-07-10 15:20:52 +01:00
parent b92b5c0e9f
commit 35894edacf
1 changed files with 4 additions and 1 deletions

View File

@ -141,9 +141,11 @@ function restore_remote_hubzilla {
} }
function remove_hubzilla { function remove_hubzilla {
if ! grep -Fxq "install_hubzilla" $COMPLETION_FILE; then if ! grep -Fxq "Hubzilla domain" $COMPLETION_FILE; then
return return
fi fi
echo $'Removing Hubzilla'
HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
nginx_dissite $HUBZILLA_DOMAIN_NAME nginx_dissite $HUBZILLA_DOMAIN_NAME
if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
rm -rf /var/www/$HUBZILLA_DOMAIN_NAME rm -rf /var/www/$HUBZILLA_DOMAIN_NAME
@ -157,6 +159,7 @@ function remove_hubzilla {
remove_onion_service hubzilla ${HUBZILLA_ONION_PORT} remove_onion_service hubzilla ${HUBZILLA_ONION_PORT}
sed -i '/install_hubzilla/d' $COMPLETION_FILE sed -i '/install_hubzilla/d' $COMPLETION_FILE
sed -i '/Hubzilla /d' $COMPLETION_FILE sed -i '/Hubzilla /d' $COMPLETION_FILE
echo $'Hubzilla was removed'
} }
function install_hubzilla { function install_hubzilla {