#!/bin/sh
#
# $Id: news,v 4.1 1993/03/23 16:17:10 mike Exp $
#
# This is for Cnews and trn. Add others as you wish but put a test
# round them to avoid annoying warnings if they aren't actually installed.

# Load the library and find various programs.
. /etc/init.d/LIB
ps=`pathof ps`


DAEMONS="mthreads"

case "$1" in
	start)
		if [ -x /usr/lib/newsbin/maint/newsboot ]; then
			/usr/lib/newsbin/maint/newsboot
		fi

		if [ -x /usr/lib/news/trn/mthreads ]; then
			/usr/lib/news/trn/mthreads -d -ae all
		fi
		;;

	stop)
		for p in $DAEMONS
		do
			pidof $p | while read i
			do
				kill $i
			done
		done
		;;

	*)
		echo "usage: news start|stop"
		exit 1
		;;
esac
