Skip to content

Instantly share code, notes, and snippets.

@jeffgeiger
Last active September 10, 2015 17:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeffgeiger/201a2e4bcddb41a210af to your computer and use it in GitHub Desktop.
Save jeffgeiger/201a2e4bcddb41a210af to your computer and use it in GitHub Desktop.
ez-ipupdate config on a RasPi2 for ZoneEdit
*/5 * * * * /usr/local/bin/ipupdate.sh >> /var/log/ipupdate.log 2>&1
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
#!/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