diff options
Diffstat (limited to 'sys-devel/distcc/files/3.1/init')
-rw-r--r-- | sys-devel/distcc/files/3.1/init | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sys-devel/distcc/files/3.1/init b/sys-devel/distcc/files/3.1/init new file mode 100644 index 000000000000..e89dcb3702b7 --- /dev/null +++ b/sys-devel/distcc/files/3.1/init @@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use avahi-daemon ypbind +} + +start() { + ebegin "Starting distccd" + + if [ ! -e /var/run/distccd ] ; then + mkdir -p /var/run/distccd + chown distcc:daemon /var/run/distccd + fi + + # Load PATH and GCC_SPECS from gcc-config, bug #262773 + eval "$(gcc-config -E)" + + start-stop-daemon --start --quiet --exec "${DISTCCD_EXEC}" --user distcc -- \ + --daemon --pid-file "${DISTCCD_PIDFILE}" \ + ${DISTCCD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping distccd" + start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}" + eend $? +} |