#! /bin/sh
# newsrunning - turn news processing on and off

# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/local/lib/news/bin/config}

PATH=$NEWSCTL/bin:$NEWSBIN/input:$NEWSBIN:$NEWSPATH ; export PATH
umask $NEWSUMASK

stop=$NEWSARTS/in.coming/stop

case "$1"
in
	'on')
	rm -f $stop
	;;

	'off')
	if test ! -r $stop	# don't update already-existing file
	then
		>$stop
	fi
	;;

	'')
	if test -r $stop
	then
		echo off
	else
		echo on
	fi
	;;

	*)
	echo "Usage: $0 [on/off]" >&2
	exit 2
	;;
esac

exit 0
