#! /bin/sh
#
# aqotdd           Supplies fortunes on demand over the network.
#               
#
# chkconfig: 2345 60 60
# description: Afghan QOTDD is the *best* thing you could possibly have.
# processname: aqotdd

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting aqotdd: "
        daemon aqotdd
        echo
        touch /var/lock/subsys/aqotdd
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down aqotdd: "
	killproc aqotdd
        echo
        rm -f /var/lock/subsys/aqotdd
        ;;
  status)
	status aqotdd
	;;
  restart|reload)
	$0 stop
	$0 start
	;;
  *)
        echo "Usage: aqotdd {start|stop|restart|reload|status}"
        exit 1
esac

exit 0
