Don't restart tor if not needed
This commit is contained in:
parent
ba8f72ad91
commit
698cba0449
|
@ -1294,6 +1294,12 @@ function add_onion_service {
|
||||||
onion_service_name="$1"
|
onion_service_name="$1"
|
||||||
onion_service_port_from=$2
|
onion_service_port_from=$2
|
||||||
onion_service_port_to=$3
|
onion_service_port_to=$3
|
||||||
|
|
||||||
|
if [ -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; then
|
||||||
|
echo $(cat /var/lib/tor/hidden_service_${onion_service_name}/hostname)
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -d /var/lib/tor ]; then
|
if [ ! -d /var/lib/tor ]; then
|
||||||
echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured."
|
echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured."
|
||||||
exit 877367
|
exit 877367
|
||||||
|
|
Loading…
Reference in New Issue