Function to remove an onion service

This commit is contained in:
Bob Mottram 2016-07-04 08:14:09 +01:00
parent e69717af61
commit 5281b96330
1 changed files with 12 additions and 4 deletions

View File

@ -54,6 +54,14 @@ function wait_for_onion_service {
fi
}
function remove_onion_service {
onion_service_name="$1"
onion_service_port_to=$2
sed -i "/hidden_service_${onion_service_name}/d" /etc/tor/torrc
sed -i "/127.0.0.1:${onion_service_port_to}/d" /etc/tor/torrc
systemctl restart tor
}
function add_onion_service {
onion_service_name="$1"
onion_service_port_from=$2