|  | @@ -47,7 +47,7 @@ function wait_for_onion_service_base {
 | 
	
		
			
			| 47 | 47 |      onion_service_name="$1"
 | 
	
		
			
			| 48 | 48 |  
 | 
	
		
			
			| 49 | 49 |      sleep_ctr=0
 | 
	
		
			
			| 50 |  | -    while [ $(onion_service_exists ${onion_service_name}) == "0" ]; do
 | 
	
		
			
			|  | 50 | +    while [[ $(onion_service_exists ${onion_service_name}) == "0" ]]; do
 | 
	
		
			
			| 51 | 51 |          sleep 1
 | 
	
		
			
			| 52 | 52 |          sleep_ctr=$((sleep_ctr + 1))
 | 
	
		
			
			| 53 | 53 |          if [ $sleep_ctr -gt 10 ]; then
 | 
	
	
		
			
			|  | @@ -61,7 +61,7 @@ function wait_for_onion_service {
 | 
	
		
			
			| 61 | 61 |  
 | 
	
		
			
			| 62 | 62 |      wait_for_onion_service_base ${onion_service_name}
 | 
	
		
			
			| 63 | 63 |  
 | 
	
		
			
			| 64 |  | -    if [ $(onion_service_exists ${onion_service_name}) == "0" ]; then
 | 
	
		
			
			|  | 64 | +    if [[ $(onion_service_exists ${onion_service_name}) == "0" ]]; then
 | 
	
		
			
			| 65 | 65 |          # try a second time
 | 
	
		
			
			| 66 | 66 |          onion_update
 | 
	
		
			
			| 67 | 67 |          wait_for_onion_service_base ${onion_service_name}
 | 
	
	
		
			
			|  | @@ -102,7 +102,7 @@ function add_onion_service {
 | 
	
		
			
			| 102 | 102 |      onion_service_port_from=$2
 | 
	
		
			
			| 103 | 103 |      onion_service_port_to=$3
 | 
	
		
			
			| 104 | 104 |  
 | 
	
		
			
			| 105 |  | -    if [ $(onion_service_exists ${onion_service_name}) == "1" ]; then
 | 
	
		
			
			|  | 105 | +    if [[ $(onion_service_exists ${onion_service_name}) == "1" ]]; then
 | 
	
		
			
			| 106 | 106 |          echo $(cat /var/lib/tor/hidden_service_${onion_service_name}/hostname)
 | 
	
		
			
			| 107 | 107 |          return
 | 
	
		
			
			| 108 | 108 |      fi
 | 
	
	
		
			
			|  | @@ -122,7 +122,7 @@ function add_onion_service {
 | 
	
		
			
			| 122 | 122 |      function_check wait_for_onion_service
 | 
	
		
			
			| 123 | 123 |      wait_for_onion_service ${onion_service_name}
 | 
	
		
			
			| 124 | 124 |  
 | 
	
		
			
			| 125 |  | -    if [ $(onion_service_exists ${onion_service_name}) == "0" ]; then
 | 
	
		
			
			|  | 125 | +    if [[ $(onion_service_exists ${onion_service_name}) == "0" ]]; then
 | 
	
		
			
			| 126 | 126 |          echo $"${onion_service_name} onion site hostname not found"
 | 
	
		
			
			| 127 | 127 |          exit 76362
 | 
	
		
			
			| 128 | 128 |      fi
 |