#!/bin/sh
#
# beepingdns.sh - check for differences between local external IP and dns IP
# 18.04.05 - maxious@lambdacomplex.org
# Known Issues - host has to be a direct reference to your server (ie. cnames don't work)
#
HOST="lappy.lambdacomplex.org"
UPDATEURL='http://freedns.afraid.org/dynamic/update.php?......'
CURRENTIP=`lynx --dump http://ip.dnsexit.com/ | sed -e 's/ //'`
DNSIP=`host $HOST |sed -e "s/$HOST has address //" | sed -e 's/ //'`
if [ "$CURRENTIP" != "$DNSIP" ]; then 
# do stuff
lynx --dump $UPDATEURL
beep
fi
