Browse Source

Don't restart tor if not needed

Bob Mottram 9 years ago
parent
commit
698cba0449
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      src/freedombone

+ 6
- 0
src/freedombone View File

1294
     onion_service_name="$1"
1294
     onion_service_name="$1"
1295
     onion_service_port_from=$2
1295
     onion_service_port_from=$2
1296
     onion_service_port_to=$3
1296
     onion_service_port_to=$3
1297
+
1298
+    if [ -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; then
1299
+        echo $(cat /var/lib/tor/hidden_service_${onion_service_name}/hostname)
1300
+        return
1301
+    fi
1302
+
1297
     if [ ! -d /var/lib/tor ]; then
1303
     if [ ! -d /var/lib/tor ]; then
1298
         echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured."
1304
         echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured."
1299
         exit 877367
1305
         exit 877367