#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-process/dcron/files/dcron,v 1.2 2005/04/20 01:57:28 vapier Exp $

depend() {
	use logger clock hostname
	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 $?
}
