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

(-)cupsd (-4 / +25 lines)
Lines 1-7 Link Here
1
#!/sbin/runscript
1
#!/sbin/runscript
2
# Copyright 1999-2003 Gentoo Technologies, Inc.
2
# Copyright 1999-2003 Gentoo Technologies, Inc.
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/net-print/cups/files/cupsd.rc6,v 1.12 2003/07/28 12:57:08 lanius Exp $
4
# $Header: /home/cvsroot/gentoo-x86/net-print/cups/files/cupsd.rc6,v 1.9 2003/07/18 12:19:04 lanius Exp $
5
6
DAEMONTOOLSDIR="/var/daemontools/cupsd"
5
7
6
depend() {
8
depend() {
7
	before nfs
9
	before nfs
Lines 9-21 Link Here
9
}
11
}
10
12
11
start() {
13
start() {
12
	ebegin "Starting cupsd"
14
	if [ -x /usr/bin/svc ] && [ -x "${DAEMONTOOLSDIR}/run" ] \
13
	start-stop-daemon --start --quiet --exec /usr/sbin/cupsd
15
		&& [ ! -f "${DAEMONTOOLSDIR}/noinit" ]
16
	then
17
		ebegin "Starting supervised cupsd"
18
		/usr/bin/supervise "$DAEMONTOOLSDIR" &
19
	else
20
		ebegin "Starting cupsd"
21
		start-stop-daemon --start --quiet --exec /usr/sbin/cupsd
22
	fi
14
	eend $?
23
	eend $?
15
}
24
}
16
25
17
stop() {
26
stop() {
18
	ebegin "Stopping cupsd"
27
	ebegin "Stopping cupsd"
19
	start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd
28
	if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR"
29
	then
30
		/usr/bin/svc -dx "$DAEMONTOOLSDIR"
31
	else
32
		start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd
33
	fi
20
	eend $?
34
	eend $?
21
}
35
}
36
37
status() {
38
	if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR"
39
	then
40
		einfo `/usr/bin/svstat "$DAEMONTOOLSDIR"`
41
	fi
42
}

Return to bug 28943