:
#	@(#) cron 1.7 89/07/10 
#
#
#	      UNIX is a registered trademark of AT&T
#		Portions Copyright 1976-1989 AT&T
#	Portions Copyright 1980-1989 Microsoft Corporation
#    Portions Copyright 1983-1989 The Santa Cruz Operation, Inc
#		      All Rights Reserved

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

#	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')
	[ -x /bin/ps ] &&
	pid=`/bin/su root -c "/bin/ps -e" | grep cron | sed -e 's/^  *//' -e 's/ .*//'`
	if [ "${pid}" != "" ]
	then
		[ -x /bin/kill ] &&
		/bin/kill ${pid}
	fi
	;;
*)
	echo "usage: /etc/init.d/cron {start|stop}"
	;;
esac
