This commit is contained in:
Bob Mottram 2017-06-11 19:41:15 +01:00
parent 0e86c3f541
commit 1208d8f860
1 changed files with 3 additions and 12 deletions

View File

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