From 1d868312e03fd8c4c60582481930d6d43fcb6c7d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 7 Mar 2017 15:12:34 +0000 Subject: [PATCH] Removing stealth onions --- src/freedombone-app-tahoelafs | 2 +- src/freedombone-utils-onion | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-tahoelafs b/src/freedombone-app-tahoelafs index fbf104bf..a62d9ec3 100755 --- a/src/freedombone-app-tahoelafs +++ b/src/freedombone-app-tahoelafs @@ -343,7 +343,7 @@ function remove_tahoelafs { remove_completion_param install_tahoelafs function_check remove_onion_service remove_onion_service tahoelafs ${TAHOELAFS_ONION_PORT} - remove_onion_service storage-tahoelafs ${TAHOELAFS_STORAGE_ONION_PORT} + remove_onion_service storage-tahoelafs ${TAHOELAFS_STORAGE_ONION_PORT} $(get_tahoelafs_nick) sed -i '/HidServAuth /d' /etc/tor/torrc deluser tahoelafs if [ -d /home/tahoelafs ]; then diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index aaeb20b8..3f98ae7f 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -82,8 +82,11 @@ function wait_for_onion_service { function remove_onion_service { onion_service_name="$1" onion_service_port_to=$2 + nick="$3" - #sed -i "/stealth ${onion_service_name}/d" /etc/tor/torrc + if [ ${#nick} -gt 0 ]; then + sed -i "/stealth ${nick}/d" /etc/tor/torrc + fi sed -i "/hidden_service_${onion_service_name}/d" /etc/tor/torrc sed -i "/hidden_service_${onion_service_name}_mobile/d" /etc/tor/torrc sed -i "/127.0.0.1:${onion_service_port_to}/d" /etc/tor/torrc