Bläddra i källkod

Third time lucky

Bob Mottram 7 år sedan
förälder
incheckning
222601c2b6
1 ändrade filer med 7 tillägg och 1 borttagningar
  1. 7
    1
      src/freedombone-utils-onion

+ 7
- 1
src/freedombone-utils-onion Visa fil

59
     while [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; do
59
     while [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; do
60
         sleep 1
60
         sleep 1
61
         sleep_ctr=$((sleep_ctr + 1))
61
         sleep_ctr=$((sleep_ctr + 1))
62
-        if [ $sleep_ctr -gt 20 ]; then
62
+        if [ $sleep_ctr -gt 10 ]; then
63
             break
63
             break
64
         fi
64
         fi
65
     done
65
     done
75
         onion_update
75
         onion_update
76
         wait_for_onion_service_base ${onion_service_name}
76
         wait_for_onion_service_base ${onion_service_name}
77
     fi
77
     fi
78
+
79
+    if [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; then
80
+        # try a third time
81
+        onion_update
82
+        wait_for_onion_service_base ${onion_service_name}
83
+    fi
78
 }
84
 }
79
 
85
 
80
 function remove_onion_service {
86
 function remove_onion_service {