#!/bin/sh

# For Red Hat chkconfig
# chkconfig: - 30 80
# description: the dynamic dns updater

case "$1" in
  start)
    echo "Starting inadyn"

    /usr/bin/inadyn

    if [ -d /var/lock/subsys ]; then
      touch /var/lock/subsys/inadyn
    fi
    ;;
  stop)
    echo "Stopping inadyn..."

    killall /usr/bin/inadyn

    rm /var/lock/subsys/inadyn
    ;;
  *)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
esac

exit 0

