#!/bin/sh
#
# Copyright(c) 1997, by Sun Microsystems, Inc.
# All rights reserved.
#
#ident	"@(#)cron	1.12	00/03/13 SMI"	/* SVr4.0 1.3.3.1	*/

#	cron control
pid=`/usr/bin/ps -ef |awk '/\/usr\/sbin\/cron/ {print $2}' | /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
case $1 in
'start')
	if [ "${pid}" = "" ]
	then
		/usr/bin/rm -f /etc/cron.d/FIFO
		if [ -x /usr/sbin/cron ]
		then
			/usr/sbin/cron
		fi
	fi
	;;
'stop')
	if [ "${pid}" != "" ]
	then
		/usr/bin/kill ${pid}
	fi
	;;
*)
	echo "usage: /etc/init.d/cron {start|stop}"
	;;
esac
