#! /bin/sh
# Copyright (C) 2004 by Patrick Trettenbrein - patrick.trettenbrein@kdemail.net
#

DD_BIN=/usr/sbin/ddclient
test -x $DD_BIN || exit 5


case "$1" in
    start)
	echo -n "Starting ddclient daemon"
	startproc $DD_BIN
	
	rc_status -v
	;;
    stop)
	echo -n "Shutting down ddclient daemon"

	killproc -TERM $DD_BIN

	rc_status -v
	;;
    try-restart)
    
	$0 status >/dev/null &&  $0 restart

	rc_status
	;;
    restart)
	
	$0 stop
	$0 start

	rc_status
	;;
    force-reload)

	echo -n "Reload service ddclient"
	
	checkproc $DD_BIN
	rc_status -v

	;;
    reload)

	rc_status -v
	;;
    status)
	echo -n "Checking for ddclient: "

	checkproc $DD_BIN
	rc_status -v
	;;
    probe)
	

	;;
    *)
	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
	exit 1
	;;
esac
rc_exit

