Function to remove an onion service
This commit is contained in:
parent
e69717af61
commit
5281b96330
|
@ -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
|
||||
|
@ -120,19 +128,19 @@ function create_avahi_onion_domains {
|
|||
return
|
||||
fi
|
||||
if [ $MICROBLOG_DOMAIN_NAME ]; then
|
||||
function_check create_avahi_service
|
||||
function_check create_avahi_service
|
||||
create_avahi_service microblog http tcp $MICROBLOG_ONION_PORT
|
||||
fi
|
||||
if [ $FULLBLOG_DOMAIN_NAME ]; then
|
||||
function_check create_avahi_service
|
||||
function_check create_avahi_service
|
||||
create_avahi_service blog http tcp $BLOG_ONION_PORT
|
||||
fi
|
||||
if [ $GIT_DOMAIN_NAME ]; then
|
||||
function_check create_avahi_service
|
||||
function_check create_avahi_service
|
||||
create_avahi_service git http tcp $GIT_ONION_PORT
|
||||
fi
|
||||
if [ $WIKI_DOMAIN_NAME ]; then
|
||||
function_check create_avahi_service
|
||||
function_check create_avahi_service
|
||||
create_avahi_service wiki http tcp $WIKI_ONION_PORT
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue