From 1208d8f860bf43ea3c9d9b1d9e37fe7da5390c0b Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 11 Jun 2017 19:41:15 +0100 Subject: [PATCH] Try sync --- src/freedombone-utils-onion | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/freedombone-utils-onion b/src/freedombone-utils-onion index 2a6b98ab..c545205d 100755 --- a/src/freedombone-utils-onion +++ b/src/freedombone-utils-onion @@ -56,20 +56,11 @@ function wait_for_onion_service_base { onion_service_name="$1" sleep_ctr=0 - onion_site_domain='' - while [ ${#onion_site_domain} -lt 2 ]; do - if [ -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; then - onion_site_domain=$(cat ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname) - fi - - if [ ${#onion_site_domain} -gt 1 ]; then - break - fi - + while [ ! -f ${HIDDEN_SERVICE_PATH}${onion_service_name}/hostname ]; do sleep 1 - + sync sleep_ctr=$((sleep_ctr + 1)) - if [ $sleep_ctr -gt 15 ]; then + if [ $sleep_ctr -gt 10 ]; then break fi done