#! /bin/sh
#
# init.d/inn2	Start/stop the news server.
#

test -f /usr/lib/news/bin/innd || exit 0

start () {
    su news -c /usr/lib/news/bin/rc.news
}

stop () {
    su news -c '/usr/lib/news/bin/rc.news stop'
}

case "$1" in
    start)
	start
	;;
    stop)
	echo "Stopping news server: innd"
	stop
	;;
    restart|force-reload)
	stop
	sleep 2
	start
	;;
    *)
	echo "Usage: /etc/init.d/inn start|stop|restart|force-reload">&2
	exit 1
	;;
esac

exit 0
