Explorar el Código

Get domain when removing hubzilla

Bob Mottram hace 8 años
padre
commit
35894edacf
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4
    1
      src/freedombone-app-hubzilla

+ 4
- 1
src/freedombone-app-hubzilla Ver fichero

@@ -141,9 +141,11 @@ function restore_remote_hubzilla {
141 141
 }
142 142
 
143 143
 function remove_hubzilla {
144
-    if ! grep -Fxq "install_hubzilla" $COMPLETION_FILE; then
144
+    if ! grep -Fxq "Hubzilla domain" $COMPLETION_FILE; then
145 145
         return
146 146
     fi
147
+    echo $'Removing Hubzilla'
148
+    HUBZILLA_DOMAIN_NAME=$(cat $COMPLETION_FILE | grep "Hubzilla domain" | awk -F ':' '{print $2}')
147 149
     nginx_dissite $HUBZILLA_DOMAIN_NAME
148 150
     if [ -d /var/www/$HUBZILLA_DOMAIN_NAME ]; then
149 151
         rm -rf /var/www/$HUBZILLA_DOMAIN_NAME
@@ -157,6 +159,7 @@ function remove_hubzilla {
157 159
     remove_onion_service hubzilla ${HUBZILLA_ONION_PORT}
158 160
     sed -i '/install_hubzilla/d' $COMPLETION_FILE
159 161
     sed -i '/Hubzilla /d' $COMPLETION_FILE
162
+    echo $'Hubzilla was removed'
160 163
 }
161 164
 
162 165
 function install_hubzilla {