blob: d8a18435f1dd5a872a2a644428f011865446e711 (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#!/sbin/openrc-run
# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.18-r1/init,v 1.1 2008/01/04 03:53:15 betelgeuse Exp $
depend() {
local avahi
#ifdef AVAHI
[ ${DISTCCD_AVAHI} = yes ] && avahi="avahi-daemon"
#endif
need net ${avahi}
after firewall
use ypbind
}
start() {
[ -e "${DISTCCD_PIDFILE}" ] && rm -f ${DISTCCD_PIDFILE} &>/dev/null
local args
#ifdef AVAHI
[ ${DISTCCD_AVAHI} = yes ] && args="--zeroconf"
#endif
ebegin "Starting distccd"
chown distcc `dirname ${DISTCCD_PIDFILE}` >/dev/null 2>&1
TMPDIR="${TMPDIR}" \
/sbin/start-stop-daemon --start --quiet --exec ${DISTCCD_EXEC} \
--pidfile ${DISTCCD_PIDFILE} -- \
--pid-file ${DISTCCD_PIDFILE} -N ${DISTCCD_NICE} --user distcc \
${args} ${DISTCCD_OPTS}
eend $?
}
stop() {
ebegin "Stopping distccd"
start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}" \
&& rm -f "${DISTCCD_PIDFILE}"
eend $?
}
|