Well .... with some prodding from
termina 
.... here is my update script (actually, two scripts):
The first script is called
check_ip and I call it every 15 minutes ... it checks my IP address on eth0 (my external NIC on my Linux firewall) and then does a name lookup at the zoneedit site. If the IPs match, it does nothing ... if they don't, it updates the website with the text browser
lynx.
If I can't get a name lookup at all ... (that is, $DOMAIN_IP is blank) then I restart my network and restart my firewall ... my ISP requires my cable modem to download it's configuration file at a certian interval ... and after it downloads, I can't talk to the internet until I do another DHCP request ... so this part of the script does that for me).
check_ipCODE
#!/bin/bash
###############################
#Full Path to executables
#use the command "which ifconfig", etc. to find the info on your system ...
#this is correct for most RedHat distros
IFCONFIG=/sbin/ifconfig
AWK=/bin/awk
GREP=/bin/grep
DIG=/usr/bin/dig
LYNX=/usr/bin/lynx
ECHO=/bin/echo
###############################
###############################
#External Interface (if on this machine)
EXTIF="eth0"
###############################
###############################
#Domain name to Monitor (you only need 1 for all domains in this IP)
DOMAIN_NAME="www.hughesjr.com"
###############################
###############################
#Primary DNS listed
PRIMARY_DNS="ns5.zoneedit.com"
###############################
###############################
#Domains to update (enter all domains with a space between them)
#Example DOMAINS_TO_UPDATE="domain1.com www.domain1.com ftp.domain1.com domain2.org"
DOMAINS_TO_UPDATE="hughesjr.com www.hughesjr.com mail.hughesjr.com"
###############################
###############################
#ZoneEdit username and password
USERNAME="your_username_here"
PASSWORD="your_zoneedit_password_here"
###############################
###############################
#Get the External IP address
#
# If the machine you are running this script on is your firewall,
# use the IFCONFIG line to find your external IP address. If you have
# an external firewall, comment out the IFCONFIG EXTIP line (with a #)
# and use the LYNX (remove the #) instead.
#
EXTIP="`$IFCONFIG $EXTIF | $AWK /$EXTIF/'{next}//{split($0,a,":");split(a[2],a," ");print a[1];exit}'`"
#EXTIP="`$LYNX -source http://www.whatismyip.com/ | $GREP 'TITLE' | $AWK '{split($0,a,"is");split(a[2],a," ");print a[1];exit}'`"
###############################
#####---------------------------------------------######
#####----------------SCRIPT BEGINS----------------######
#####-No changes normally needed below this point-######
#####---------------------------------------------######
#Date for Logs
DATE="`date +'%x %X %Z - '`"
#Get the Domain Name's IP Address
DOMAIN_IP="`$DIG @$PRIMARY_DNS $DOMAIN_NAME | grep $DOMAIN_NAME | grep -v DiG | grep -v ";"$DOMAIN_NAME | awk '{print $5}'`"
###############################
#If there is an error, log it and exit the script
#otherwise, continue with the updates
if [ "$DOMAIN_IP"x == x ]; then
$ECHO $DATE"Error doing lookup!" >> /var/log/check_ip.log
/etc/init.d/network restart
/etc/rc.d/rc.firewall
exit 1
else
###################
#This is for testing, or a more verbose output to the screen
#$ECHO "External IP: "$EXTIP
#$ECHO "Monitored IP: "$DOMAIN_IP
#$ECHO "Domains to update: "$DOMAINS_TO_UPDATE
###################
#Actual update is required ... update domains and log it
if [ "$EXTIP" == "$DOMAIN_IP" ]; then
#$ECHO $DATE"External IP("$EXTIP") matches Domain IP("$DOMAIN_IP"). No Action required."
exit 0
else
for DOMAIN in $DOMAINS_TO_UPDATE
do
$ECHO $DATE"Updating "$DOMAIN" from "$DOMAIN_IP" to "$EXTIP >> /var/log/check_ip.log
COMMAND="$LYNX -source -auth=$USERNAME:$PASSWORD http://dynamic.zoneedit.com/auth/dynamic.html?host=$DOMAIN"
$COMMAND
done
fi
fi
The other script is one that I run once a month (it is called
monthly_update_ip. Even if your IP hasn't changed, if it isn't updated at least once a month then zoneedit will close your account (because they figure you have lost interest in maintaining your site). SO this script is basically the same as the other script ... but it does the update even if the looked up IP is the same as the external IP.
monthly_update_ipCODE
#!/bin/bash
###############################
#Full Path to executables
#use the command "which ifconfig", etc. to find the info on your system ...
#this is correct for most RedHat distros
IFCONFIG=/sbin/ifconfig
AWK=/bin/awk
GREP=/bin/grep
DIG=/usr/bin/dig
LYNX=/usr/bin/lynx
ECHO=/bin/echo
###############################
###############################
#External Interface (if on this machine)
EXTIF="eth0"
###############################
###############################
#Domain name to Monitor (you only need 1 for all domains in this IP)
DOMAIN_NAME="www.hughesjr.com"
###############################
###############################
#Primary DNS listed
PRIMARY_DNS="ns5.zoneedit.com"
###############################
###############################
#Domains to update (enter all domains with a space between them)
#Example DOMAINS_TO_UPDATE="domain1.com www.domain1.com ftp.domain1.com domain2.org"
DOMAINS_TO_UPDATE="hughesjr.com www.hughesjr.com mail.hughesjr.com"
###############################
###############################
#ZoneEdit username and password
USERNAME="your_username_here"
PASSWORD="your_zoneedit_password_here"
###############################
###############################
#Get the External IP address
#
# If the machine you are running this script on is your firewall,
# use the IFCONFIG line to find your external IP address. If you have
# an external firewall, comment out the IFCONFIG EXTIP line (with a #)
# and use the LYNX (remove the #) instead.
#
EXTIP="`$IFCONFIG $EXTIF | $AWK /$EXTIF/'{next}//{split($0,a,":");split(a[2],a," ");print a[1];exit}'`"
#EXTIP="`$LYNX -source http://www.whatismyip.com/ | $GREP 'TITLE' | $AWK '{split($0,a,"is");split(a[2],a," ");print a[1];exit}'`"
###############################
#####---------------------------------------------######
#####----------------SCRIPT BEGINS----------------######
#####-No changes normally needed below this point-######
#####---------------------------------------------######
#Date for Logs
DATE="`date +'%x %X %Z - '`"
#Get the Domain Name's IP Address
DOMAIN_IP="`$DIG @$PRIMARY_DNS $DOMAIN_NAME | grep $DOMAIN_NAME | grep -v DiG | grep -v ";"$DOMAIN_NAME | awk '{print $5}'`"
###############################
#If there is an error, log it and exit the script
#otherwise, continue with the updates
if [ "$DOMAIN_IP"x == x ]; then
$ECHO $DATE"Error doing lookup!" >> /var/log/check_ip.log
exit 1
else
###################
#This is for testing, or a more verbose output to the screen
#$ECHO "External IP: "$EXTIP
#$ECHO "Monitored IP: "$DOMAIN_IP
#$ECHO "Domains to update: "$DOMAINS_TO_UPDATE
###################
#Actual update is required ... update domains and log it
for DOMAIN in $DOMAINS_TO_UPDATE
do
$ECHO $DATE"Updating "$DOMAIN" from "$DOMAIN_IP" to "$EXTIP >> /var/log/check_ip.log
COMMAND="$LYNX -source -auth=$USERNAME:$PASSWORD http://dynamic.zoneedit.com/auth/dynamic.html?host=$DOMAIN"
$COMMAND
done
fi
If you have an external router ... you need to figure out how to get the external IP address from it. Most have a URL that you can use to do that.
There are 3 long lines in the code that might wrap ... they are both a single line ... here they are:
DOMAIN_IP="`$DIG @$PRIMARY_DNS $DOMAIN_NAME | grep $DOMAIN_NAME | grep -v DiG | grep -v ";"$DOMAIN_NAME | awk '{print $5}'`"
the EXTIP lines are also one line....
and
CODE
COMMAND="$LYNX -source -auth=$USERNAME:$PASSWORD http://dynamic.zoneedit.com/auth/dynamic.html?host=$DOMAIN"
########################EDITED##########################OK ---- I edited the file and added a second option for EXTIP if you have an external router.....