Browse Source

Fix removal of onion services

Bob Mottram 8 years ago
parent
commit
52e0e2ddb9
2 changed files with 7 additions and 4 deletions
  1. 4
    4
      src/freedombone-app-blog
  2. 3
    0
      src/freedombone-utils-onion

+ 4
- 4
src/freedombone-app-blog View File

588
 }
588
 }
589
 
589
 
590
 function install_blog {
590
 function install_blog {
591
+    if [[ $(app_is_installed blog) == "1" ]]; then
592
+        return
593
+    fi
594
+
591
     if [ ! $ONION_ONLY ]; then
595
     if [ ! $ONION_ONLY ]; then
592
         ONION_ONLY='no'
596
         ONION_ONLY='no'
593
     fi
597
     fi
615
         exit 5062
619
         exit 5062
616
     fi
620
     fi
617
 
621
 
618
-    if [[ $(app_is_installed blog) == "1" ]]; then
619
-        return
620
-    fi
621
-
622
     # for the avatar changing command
622
     # for the avatar changing command
623
     apt-get -y install imagemagick
623
     apt-get -y install imagemagick
624
 
624
 

+ 3
- 0
src/freedombone-utils-onion View File

68
             fi
68
             fi
69
         fi
69
         fi
70
     fi
70
     fi
71
+    if [ -d /var/lib/tor/hidden_service_${onion_service_name} ]; then
72
+        rm -rf /var/lib/tor/hidden_service_${onion_service_name}
73
+    fi
71
     systemctl restart tor
74
     systemctl restart tor
72
 }
75
 }
73
 
76