mirror of
				https://github.com/iv-org/documentation.git
				synced 2025-10-31 06:36:04 -04:00 
			
		
		
		
	Gluetun tutorial update: Fix the script
This commit is contained in:
		
							parent
							
								
									fa9f2593b4
								
							
						
					
					
						commit
						6c77f31d2f
					
				
					 1 changed files with 7 additions and 7 deletions
				
			
		|  | @ -113,23 +113,23 @@ Note: `2>&1` sent STDERR to STDOUT, `tee /path/to/restartvpn.log` will write the | |||
| ```bash | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| echo "BEGIN $(date --rfc-3339=seconds)" 2>&1 | tee /path/to/restartvpn.log | ||||
| echo "BEGIN $(date --rfc-3339=seconds)" 2>&1 | tee -a /path/to/restartvpn.log | ||||
| 
 | ||||
| curl -X GET "http://127.0.0.1:8000/v1/publicip/ip" 2>&1 | tee /path/to/restartvpn.log # Print the original IP | ||||
| curl -s -X GET "http://127.0.0.1:8000/v1/publicip/ip" 2>&1 | tee -a /path/to/restartvpn.log # Print the original IP | ||||
| 
 | ||||
| curl -X PUT -H "Content-Type: application/json" -d '{"status":"stopped"}' "http://127.0.0.1:8000/v1/openvpn/status" 2>&1 | tee /path/to/restartvpn.log # Stop OpenVPN | ||||
| curl -s -X PUT -H "Content-Type: application/json" -d '{"status":"stopped"}' "http://127.0.0.1:8000/v1/openvpn/status" 2>&1 | tee -a /path/to/restartvpn.log # Stop OpenVPN | ||||
| 
 | ||||
| sleep 5 | ||||
| 
 | ||||
| curl -X PUT -H "Content-Type: application/json" -d '{"status":"running"}' "http://127.0.0.1:8000/v1/openvpn/status" 2>&1 | tee /path/to/restartvpn.log # Start OpenVPN (changing the server it's connecting to) | ||||
| curl -s -X PUT -H "Content-Type: application/json" -d '{"status":"running"}' "http://127.0.0.1:8000/v1/openvpn/status" 2>&1 | tee -a /path/to/restartvpn.log # Start OpenVPN (changing the server it's connecting to) | ||||
| 
 | ||||
| sleep 5 | ||||
| 
 | ||||
| curl -X GET "http://127.0.0.1:8000/v1/openvpn/status" 2>&1 | tee /path/to/restartvpn.log # Print the Gluetun status | ||||
| curl -s -X GET "http://127.0.0.1:8000/v1/openvpn/status" 2>&1 | tee -a /path/to/restartvpn.log # Print the Gluetun status | ||||
| 
 | ||||
| curl -X GET "http://127.0.0.1:8000/v1/publicip/ip" 2>&1 | tee /path/to/restartvpn.log # Print the new IP | ||||
| curl -s -X GET "http://127.0.0.1:8000/v1/publicip/ip" 2>&1 | tee -a /path/to/restartvpn.log # Print the new IP | ||||
| 
 | ||||
| echo "END $(date --rfc-3339=seconds)" 2>&1 | tee /path/to/restartvpn.log | ||||
| echo "END $(date --rfc-3339=seconds)" 2>&1 | tee -a /path/to/restartvpn.log | ||||
| ``` | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 TheFrenchGhosty
						TheFrenchGhosty