|
@@ -1265,14 +1265,28 @@ function set_default_onion_domains {
|
1265
|
1265
|
|
1266
|
1266
|
function wait_for_onion_service {
|
1267
|
1267
|
onion_service_name="$1"
|
|
1268
|
+
|
1268
|
1269
|
sleep_ctr=0
|
1269
|
1270
|
while [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; do
|
1270
|
1271
|
sleep 1
|
1271
|
1272
|
sleep_ctr=$((sleep_ctr + 1))
|
1272
|
|
- if [ $sleep_ctr -gt 20 ]; then
|
|
1273
|
+ if [ $sleep_ctr -gt 10 ]; then
|
1273
|
1274
|
break
|
1274
|
1275
|
fi
|
1275
|
1276
|
done
|
|
1277
|
+
|
|
1278
|
+ if [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; then
|
|
1279
|
+ # restart and try a second time
|
|
1280
|
+ systemctl restart tor
|
|
1281
|
+ sleep_ctr=0
|
|
1282
|
+ while [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; do
|
|
1283
|
+ sleep 1
|
|
1284
|
+ sleep_ctr=$((sleep_ctr + 1))
|
|
1285
|
+ if [ $sleep_ctr -gt 10 ]; then
|
|
1286
|
+ break
|
|
1287
|
+ fi
|
|
1288
|
+ done
|
|
1289
|
+ fi
|
1276
|
1290
|
}
|
1277
|
1291
|
|
1278
|
1292
|
function add_onion_service {
|