Skip to content

Instantly share code, notes, and snippets.

@parabuzzle
Created October 1, 2008 14:44
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 parabuzzle/14091 to your computer and use it in GitHub Desktop.
Save parabuzzle/14091 to your computer and use it in GitHub Desktop.
#!/bin/sh
cip=`ifconfig eth0.1 | grep inet | cut -d ':' -f 2 | awk 'NR==1{print $1}'`
lip=`nslookup hostname.homeunix.net| grep Address | cut -d ' ' -f 2 | awk 'NR==2{print $1}' `
if [ x$cip != x$lip ]; then
/bin/update_dyndns.sh
else
echo "good"
fi
exit 0
#!/bin/sh
IP=`ifconfig eth0.1 | grep inet | cut -d ':' -f 2 | cut -d ' ' -f 1`
URL="http://username:password@members.dyndns.org/nic/update?hostname=hostname.homeunix.net&myip=$IP&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG"
curl $URL > /dev/null
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment