From 79323d4e887fd2d50ff60e1139204105b3b48992 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 4 Dec 2016 22:05:09 +0000 Subject: [PATCH] Remove mobile directory --- src/freedombone-utils-onion | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index d91334cc..47dbe6a1 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -71,6 +71,7 @@ function wait_for_onion_service { function remove_onion_service { onion_service_name="$1" onion_service_port_to=$2 + #sed -i "/stealth ${onion_service_name}/d" /etc/tor/torrc sed -i "/hidden_service_${onion_service_name}/d" /etc/tor/torrc sed -i "/hidden_service_${onion_service_name}_mobile/d" /etc/tor/torrc @@ -84,10 +85,14 @@ function remove_onion_service { fi fi fi - if [[ $(onion_service_exists ${onion_service_name}) == "1" ]]; then + if [ -d /var/lib/tor/hidden_service_${onion_service_name} ]; then shred -zu /var/lib/tor/hidden_service_${onion_service_name}/* rm -rf /var/lib/tor/hidden_service_${onion_service_name} fi + if [ -d /var/lib/tor/hidden_service_${onion_service_name}_mobile ]; then + shred -zu /var/lib/tor/hidden_service_${onion_service_name}_mobile/* + rm -rf /var/lib/tor/hidden_service_${onion_service_name}_mobile + fi remove_completion_param "${onion_service_name} onion domain" onion_update }