Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 28941
Collapse All | Expand All

(-)fcron (-3 / +26 lines)
Lines 3-8 Link Here
3
# Distributed under the terms of the GNU General Public License, v2 or later
3
# Distributed under the terms of the GNU General Public License, v2 or later
4
# $Header: /home/cvsroot/gentoo-x86/sys-apps/fcron/files/fcron.rc6,v 1.2 2003/02/14 23:25:37 vapier Exp $
4
# $Header: /home/cvsroot/gentoo-x86/sys-apps/fcron/files/fcron.rc6,v 1.2 2003/02/14 23:25:37 vapier Exp $
5
5
6
DAEMONTOOLSDIR="/var/daemontools/fcron"
7
6
depend() {
8
depend() {
7
	need clock hostname logger
9
	need clock hostname logger
8
	provide cron
10
	provide cron
Lines 18-30 Link Here
18
20
19
start() {
21
start() {
20
	checkconfig || return 1
22
	checkconfig || return 1
21
	ebegin "Starting fcron"
23
	if [ -x /usr/bin/svc ] && [ -x "${DAEMONTOOLSDIR}/run" ] \
22
	start-stop-daemon --start --quiet --exec /usr/sbin/fcron
24
		&& [ ! -f "${DAEMONTOOLSDIR}/noinit" ]
25
	then
26
		ebegin "Starting supervised fcron"
27
		/usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR" | \
28
			/usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR"/log &
29
	else
30
		ebegin "Starting fcron"
31
		start-stop-daemon --start --quiet --exec /usr/sbin/fcron
32
	fi
23
	eend $?
33
	eend $?
24
}
34
}
25
35
26
stop() {
36
stop() {
27
	ebegin "Stopping fcron"
37
	ebegin "Stopping fcron"
28
	start-stop-daemon --stop --quiet --pidfile /var/run/fcron.pid
38
	if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR"
39
	then
40
		/usr/bin/svc -dx "$DAEMONTOOLSDIR" "$DAEMONTOOLSDIR"/log
41
	else
42
		start-stop-daemon --stop --quiet --pidfile /var/run/fcron.pid
43
	fi
29
	eend $?
44
	eend $?
30
}
45
}
46
47
status() {
48
	if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR"
49
	then
50
		einfo `/usr/bin/svstat "$DAEMONTOOLSDIR"`
51
		einfo `/usr/bin/svstat "${DAEMONTOOLSDIR}/log"`
52
	fi
53
}

Return to bug 28941