Przeglądaj źródła

Don't restart tor if not needed

Bob Mottram 9 lat temu
rodzic
commit
698cba0449
1 zmienionych plików z 6 dodań i 0 usunięć
  1. 6
    0
      src/freedombone

+ 6
- 0
src/freedombone Wyświetl plik

@@ -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