Wait for onion service to arrive

This commit is contained in:
Bob Mottram 2016-01-06 19:54:21 +00:00
parent e2cddba54e
commit 59b462abf9
1 changed files with 18 additions and 2 deletions

View File

@ -6720,7 +6720,15 @@ quit" > $INSTALL_DIR/batch.sql
fi fi
systemctl restart tor systemctl restart tor
sleep 8
sleep_ctr=0
while [ ! -f /var/lib/tor/hidden_service_gogs/hostname ]; do
sleep 1
sleep_ctr=$((sleep_ctr + 1))
if [ $sleep_ctr -gt 10 ]; then
break
fi
done
GIT_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_gogs/hostname) GIT_ONION_HOSTNAME=$(cat /var/lib/tor/hidden_service_gogs/hostname)
@ -7126,7 +7134,15 @@ function install_xmpp {
fi fi
systemctl restart tor systemctl restart tor
sleep 5
sleep_ctr=0
while [ ! -f /var/lib/tor/hidden_service_xmpp/hostname ]; do
sleep 1
sleep_ctr=$((sleep_ctr + 1))
if [ $sleep_ctr -gt 10 ]; then
break
fi
done
if [ ! -f /var/lib/tor/hidden_service_xmpp/hostname ]; then if [ ! -f /var/lib/tor/hidden_service_xmpp/hostname ]; then
echo $'XMPP onion site hostname not found' echo $'XMPP onion site hostname not found'