summaryrefslogtreecommitdiff
blob: 3e0c4458d26c87bc957324873d2bd3dee7b3393b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dcron/files/dcron.rc6,v 1.8 2004/03/06 04:09:07 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 $?
}