:
#	@(#) cron 23.2 91/10/31 
#
#	Copyright (C) 1988-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#
#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 /etc/cron ]
		then
			/etc/cron
		elif [ -x /usr/bin/cron ]
		then
			/usr/bin/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
