Skip to content

Update script EveryDNS V0.2

2008 April 2
tags: ,
by Philippe Delodder

The version 0.2 of EveryDNS
update script now uses curl instead of wget to update your ip. There is
now an additional check to make sure that the update of the ip was
successful. You need to create /tmp/oldip.everydns it’s a temp file
were it checks if the ip has changed. You can download version 0.2 of
EveryDNS update script here or copy the code:

#!/bin/bashhostname="example.com"USER="username"PASS="password"VER="0.1"

IP=$(curl -s http://myip.dk/ | egrep -m1 -o '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')if [ -r "/tmp/oldip.everydns" ]; then  OLDIP=`cat /tmp/oldip.everydns`  if [ "$OLDIP" = "$IP" ]; then	exit 0  else	RETURN=$(curl -s http://${USER}:${PASS}@dyn.everydns.net/index.php?ver=${VER}&ip=${IP}&domain=${hostname}) 	echo $RETURN | grep "IP change suceeded" > /dev/null 2>&1        if [ "$?" -eq "0" ]; then              echo $IP > /tmp/oldip.everydns        else              echo "" > /tmp/oldip.everydns        fi  fifi
No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

Bad Behavior has blocked 116 access attempts in the last 7 days.