diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index f81cc66e..3015dbe4 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -41,8 +41,8 @@ function wait_for_onion_service { done if [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; then - # restart and try a second time - systemctl restart tor + # reload and try a second time + systemctl reload tor sleep_ctr=0 while [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; do sleep 1 @@ -72,7 +72,7 @@ function remove_onion_service { shred -zu /var/lib/tor/hidden_service_${onion_service_name}/* rm -rf /var/lib/tor/hidden_service_${onion_service_name} fi - systemctl restart tor + systemctl reload tor } function add_onion_service { @@ -94,7 +94,7 @@ function add_onion_service { echo "HiddenServicePort ${onion_service_port_from} 127.0.0.1:${onion_service_port_to}" >> /etc/tor/torrc fi - systemctl restart tor + systemctl reload tor function_check wait_for_onion_service wait_for_onion_service ${onion_service_name} @@ -253,7 +253,7 @@ function resolve_dns_via_tor { echo 'DNSPort 53' >> /etc/tor/torrc echo 'AutomapHostsOnResolve 1' >> /etc/tor/torrc echo 'AutomapHostsSuffixes .exit,.onion' >> /etc/tor/torrc - systemctl restart tor + systemctl reload tor fi # don't change resolv.conf