#ident	"@(#)initpkg:init.d/cron	35.1"

#	cron control
case $1 in
'start')
	set `who -r`
	if [ $9 = "S" ]
	then
		rm -f /usr/lib/cron/FIFO
		if [ -x /usr/bin/cron ]
		then
			/usr/bin/cron
		elif [ -x /etc/cron ]
		then
			/etc/cron
		fi
	fi
	;;
'stop')
	pid=`/bin/ps -e | grep cron | sed -e 's/^  *//' -e 's/ .*//'`
	if [ "${pid}" != "" ]
	then
		/bin/kill ${pid}
	fi
	;;
*)
	echo "usage: /etc/init.d/cron {start|stop}"
	;;
esac
