From 222601c2b608084a09abddee72075800b2736b7c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jun 2017 18:20:08 +0100 Subject: [PATCH] Third time lucky --- src/freedombone-utils-onion | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index 3131d0a1..c148cd60 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -59,7 +59,7 @@ function wait_for_onion_service_base { while [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; do sleep 1 sleep_ctr=$((sleep_ctr + 1)) - if [ $sleep_ctr -gt 20 ]; then + if [ $sleep_ctr -gt 10 ]; then break fi done @@ -75,6 +75,12 @@ function wait_for_onion_service { onion_update wait_for_onion_service_base ${onion_service_name} fi + + if [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; then + # try a third time + onion_update + wait_for_onion_service_base ${onion_service_name} + fi } function remove_onion_service {