#! /bin/sh
### BEGIN INIT INFO
# Provides:       netdaemon
# Required-Start: $network
# Default-Start:  3 4 5
# Default-Stop:   0 1 2 6
# Description: netdaemon, the network control and switching daemon
### END INIT INFO

NETDAEMON_BIN=/opt/gnome/bin/netdaemon
test -x $NETDAEMON_BIN || exit 5

. /etc/rc.status
rc_reset

case "$1" in
    start)
        echo -n "Starting the netdaemon"
        startproc $NETDAEMON_BIN
	rc_status -v
        ;;
    stop)
        echo -n "Shutting down the netdaemon"
        killproc -TERM $NETDAEMON_BIN
	rc_status -v
        ;;
    restart)
        $0 stop
        $0 start
	rc_status
        ;;
    force-reload|reload)
        echo -n "Reloading the netdaemon"
        killproc -HUP $NETDAEMON_BIN
	rc_status -v
        ;;
    status)
        echo -n "Checking for the netdaemon: "
        checkproc $NETDAEMON_BIN
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
        exit 1
        ;;
esac

