Browse Source

Removing prosody

Bob Mottram 7 years ago
parent
commit
2ab495c57f
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/freedombone-app-xmpp

+ 9
- 0
src/freedombone-app-xmpp View File

@@ -334,6 +334,9 @@ function update_prosody_modules {
334 334
                     cp -r $INSTALL_DIR/prosody-modules/* /var/lib/prosody/prosody-modules/
335 335
                     chown -R prosody:prosody /var/lib/prosody/prosody-modules
336 336
                     systemctl start prosody
337
+                else
338
+                    echo $'Prosody modules not extracted'
339
+                    exit 72524
337 340
                 fi
338 341
             fi
339 342
         fi
@@ -505,6 +508,12 @@ function remove_xmpp {
505 508
     remove_onion_service xmpp 5222 5223 5269
506 509
 
507 510
     apt-get -yq remove --purge prosody
511
+    if [ ! -f $INSTALL_DIR/$prosody_modules_filename ]; then
512
+        rm $INSTALL_DIR/$prosody_modules_filename
513
+    fi
514
+    if [ ! -d $INSTALL_DIR/prosody-modules ]; then
515
+        rm -rf $INSTALL_DIR/prosody-modules
516
+    fi
508 517
     if [ -d /etc/prosody ]; then
509 518
         rm -rf /etc/prosody
510 519
     fi