DynDNS

This is a SysV Init script which update DynDNS.dk with the current IP address.

## HEADER...

# Crontab-URL from http://dyndns.dk/ret.php
CRONTAB_URL="<Crontab-URL>"

CURL=/usr/bin/curl

test -x "$CURL" || exit 1

NAME=`basename $0`
set -e

case "$1" in
   start)
      echo "Starting $NAME: Updating DynDNS.dk with current IP address:"

      $CURL -s $CRONTAB_URL
      ;;
   stop)
      ;;
   *)
      echo "Usage: $NAME {start|stop}" >&2
      exit 1
      ;;
esac

exit 0

Download script: dyndns.sh

Install the script as a sysvinit service;

install --owner=root --group=root --mode=755 dyndns.sh /etc/init.d

and add it to the runlevels (notice the dot at the end),

update-rc.d dyndns.sh start 99 2 3 4 5 .

or if, for some reason, you are not running a Debian based distribution,

for runlevel in /etc/rc{2,3,4,5}.d
do
   ln -s /etc/init.d/dyndns.sh $runlevel/S99dyndns.sh
done

Now DynDNS.dk is updated with the current IP address on every bootup.