Parcourir la source

Don't restart tor if not needed

Bob Mottram il y a 9 ans
Parent
révision
698cba0449
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6
    0
      src/freedombone

+ 6
- 0
src/freedombone Voir le fichier

@@ -1294,6 +1294,12 @@ function add_onion_service {
1294 1294
     onion_service_name="$1"
1295 1295
     onion_service_port_from=$2
1296 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 1303
     if [ ! -d /var/lib/tor ]; then
1298 1304
         echo $"No Tor installation found. ${onion_service_name} onion site cannot be configured."
1299 1305
         exit 877367