Gluetun tutorial update: Add a shebang to the script

This commit is contained in:
TheFrenchGhosty 2024-07-22 19:24:48 +02:00
parent a651b80c58
commit ae92fb9d0e
No known key found for this signature in database
GPG key ID: 4E616F0FFE25B75B

View file

@ -111,6 +111,8 @@ Write a script named `restartvpn.sh` and add this content to it:
Note: `2>&1` sent STDERR to STDOUT, `tee /path/to/restartvpn.log` will write the output of the script to /path/to/restartvpn.log (in the current directory) (while still printing it to the shell)
```bash
#!/usr/bin/env bash
echo "BEGIN $(date --rfc-3339=seconds)" 2>&1 | tee /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