#!/bin/sh
#
# dyndns.sh - DynDNS.dk System V init IP update script
#
# Copyright (C) 2002 Jess Thrysoee <jess@thrysoee.dk>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#

# 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
