#!/bin/sh
#
# chkconfig: 345 95 25
# description:  This shell script takes care of starting and \
#               stopping dnews.
#
. /etc/rc.d/init.d/functions
. /etc/sysconfig/network

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

[ -f /usr/local/dnews/dnews ] || exit 0

# See how we were called.
case "$1" in
  start)
        # Start daemons.
        echo -n "Starting dnews: "
        /usr/local/dnews/dnews_start.sh
        echo
        ;;
  stop)
        # Stop daemons.
        echo -n "Shutting down dnews: "
        /usr/local/bin/tellnews exit
        echo "done"
        ;;
  *)
        echo "Usage: dnews.init {start|stop}"
        exit 1
esac

exit 0
