-
-
Save jeffgeiger/201a2e4bcddb41a210af to your computer and use it in GitHub Desktop.
ez-ipupdate config on a RasPi2 for ZoneEdit
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
*/5 * * * * /usr/local/bin/ipupdate.sh >> /var/log/ipupdate.log 2>&1 |
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
service-type=zoneedit | |
#server=(default) | |
user=USER:PASS | |
host=dyn.example.com | |
#interface=eth0 | |
#wildcard | |
#mx=(none) | |
run-as-user=ez-ipupd | |
cache-file=/var/cache/ez-ipupdate/default-cache |
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 | |
CURRENTIP=$(curl http://ipinfo.io/ip 2>/dev/nulll) | |
if [[ $CURRENTIP != $(cat /tmp/ipdata) ]]; then | |
echo "CHANGE: $CURRENTIP - $(date)" | |
ez-ipupdate -c /etc/ez-ipupdate/default.conf -a $CURRENTIP | |
echo $CURRENTIP > /tmp/ipdata | |
else | |
echo "ALL GOOD - $(date)" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment