Browse Source

Remove web install for pelican

Bob Mottram 8 years ago
parent
commit
c6e157a105
1 changed files with 8 additions and 2 deletions
  1. 8
    2
      src/freedombone-app-pelican

+ 8
- 2
src/freedombone-app-pelican View File

@@ -511,9 +511,15 @@ function restore_remote_pelican {
511 511
 }
512 512
 
513 513
 function remove_pelican {
514
-    if [ -d /var/www/$PELICAN_DOMAIN_NAME/htdocs ]; then
515
-        rm -rf /var/www/$PELICAN_DOMAIN_NAME/htdocs
514
+    if [ -f /etc/nginx/sites-available/$PELICAN_DOMAIN_NAME ]; then
515
+        nginx_dissite pelican
516
+        rm /etc/nginx/sites-available/$PELICAN_DOMAIN_NAME
517
+        if [ -d /var/www/$PELICAN_DOMAIN_NAME ]; then
518
+            rm -rf /var/www/$PELICAN_DOMAIN_NAME
519
+        fi
520
+        systemctl reload nginx
516 521
     fi
522
+
517 523
     pip uninstall pelican
518 524
     remove_certs $PELICAN_DOMAIN_NAME
519 525