diff options
Diffstat (limited to 'main/distcc/distccd.initd')
-rw-r--r-- | main/distcc/distccd.initd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/main/distcc/distccd.initd b/main/distcc/distccd.initd new file mode 100644 index 0000000000..c1490fae31 --- /dev/null +++ b/main/distcc/distccd.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript +# $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} + 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 $? +} + |