Last active
February 12, 2018 22:55
-
-
Save Stadicus/76e7b86976477d8980ef37fc263254c7 to your computer and use it in GitHub Desktop.
Write public ip address into file every 5 minutes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# getpublicip.sh | |
echo 'getpublicip.sh started, writing public IP address every 10 minutes into /run/publicip' | |
while [ 0 ]; | |
do | |
printf "PUBLICIP=$(curl -vv ipinfo.io/ip 2> /run/publicip.log)\n" > /run/publicip; | |
sleep 600 | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment