#	ATT:#ident	"initpkg:init.d/cron	1.3"	
	
#ident	"@(#)initpkg/init.d:cron	25.1"


#	cron control
case $1 in
'start')
	set `who -r`
	if [ $9 = "S" ]
	then
		rm -f /usr/lib/cron/FIFO
		if [ -f /usr/lib/cron/log ]
		then
			/bin/mv /usr/lib/cron/log /usr/lib/cron/OLDlog
		fi
		> /usr/lib/cron/log
		if [ -x /etc/cron ]
		then
			echo $0: /etc/cron started
			/etc/cron
		elif [ -x /usr/bin/cron ]
		then
			echo $0: /usr/bin/cron started
			/usr/bin/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
