#!/sbin/runscript
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# $Header: /home/cvsroot/gentoo-x86/sys-apps/dcron/files/dcron.rc6,v 1.7 2003/02/14 23:12:23 vapier Exp $

depend() {
	need clock hostname logger
	provide cron
}

start() {
	ebegin "Starting dcron"
	start-stop-daemon --start --quiet --exec /usr/sbin/crond \
		-- >>/var/log/cron.log 2>&1
	/usr/bin/pgrep -x -u 0 -P 1 crond > /var/run/cron.pid
	eend $?
}

stop() {
	ebegin "Stopping dcron"
	start-stop-daemon --stop --quiet --pidfile /var/run/cron.pid \
		--exec /usr/sbin/crond
	eend $?
}
