Try a second time
This commit is contained in:
parent
2352457d84
commit
b9a5eb54f7
|
@ -1265,14 +1265,28 @@ function set_default_onion_domains {
|
|||
|
||||
function wait_for_onion_service {
|
||||
onion_service_name="$1"
|
||||
|
||||
sleep_ctr=0
|
||||
while [ ! -f /var/lib/tor/hidden_service_${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
|
||||
|
||||
if [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; then
|
||||
# restart and try a second time
|
||||
systemctl restart tor
|
||||
sleep_ctr=0
|
||||
while [ ! -f /var/lib/tor/hidden_service_${onion_service_name}/hostname ]; do
|
||||
sleep 1
|
||||
sleep_ctr=$((sleep_ctr + 1))
|
||||
if [ $sleep_ctr -gt 10 ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
function add_onion_service {
|
||||
|
|
Loading…
Reference in New Issue