Double brackets
This commit is contained in:
parent
79323d4e88
commit
5b2fe2639c
|
@ -47,7 +47,7 @@ function wait_for_onion_service_base {
|
|||
onion_service_name="$1"
|
||||
|
||||
sleep_ctr=0
|
||||
while [ $(onion_service_exists ${onion_service_name}) == "0" ]; do
|
||||
while [[ $(onion_service_exists ${onion_service_name}) == "0" ]]; do
|
||||
sleep 1
|
||||
sleep_ctr=$((sleep_ctr + 1))
|
||||
if [ $sleep_ctr -gt 10 ]; then
|
||||
|
@ -61,7 +61,7 @@ function wait_for_onion_service {
|
|||
|
||||
wait_for_onion_service_base ${onion_service_name}
|
||||
|
||||
if [ $(onion_service_exists ${onion_service_name}) == "0" ]; then
|
||||
if [[ $(onion_service_exists ${onion_service_name}) == "0" ]]; then
|
||||
# try a second time
|
||||
onion_update
|
||||
wait_for_onion_service_base ${onion_service_name}
|
||||
|
@ -102,7 +102,7 @@ function add_onion_service {
|
|||
onion_service_port_from=$2
|
||||
onion_service_port_to=$3
|
||||
|
||||
if [ $(onion_service_exists ${onion_service_name}) == "1" ]; then
|
||||
if [[ $(onion_service_exists ${onion_service_name}) == "1" ]]; then
|
||||
echo $(cat /var/lib/tor/hidden_service_${onion_service_name}/hostname)
|
||||
return
|
||||
fi
|
||||
|
@ -122,7 +122,7 @@ function add_onion_service {
|
|||
function_check wait_for_onion_service
|
||||
wait_for_onion_service ${onion_service_name}
|
||||
|
||||
if [ $(onion_service_exists ${onion_service_name}) == "0" ]; then
|
||||
if [[ $(onion_service_exists ${onion_service_name}) == "0" ]]; then
|
||||
echo $"${onion_service_name} onion site hostname not found"
|
||||
exit 76362
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue