diff options
Diffstat (limited to 'distcc/distccd')
-rw-r--r-- | distcc/distccd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/distcc/distccd b/distcc/distccd new file mode 100644 index 000000000..21605bf0e --- /dev/null +++ b/distcc/distccd @@ -0,0 +1,31 @@ +#!/bin/sh +# +# /etc/rc.d/distccd: start/stop distcc daemon +# + +. /etc/rc.conf +if [ -z "$DISTCC_ALLOW" ]; then + echo "Please define a range of IPs allowed to connect to this distccd" + echo "host in DISTCC_ALLOW in /etc/rc.conf. More detailed information" + echo "can be found in distccd's man page." + exit -1 +fi +DISTCC_USER=${DISTCC_USER:=nobody} + +case $1 in +start) + /usr/bin/distccd --daemon --user $DISTCC_USER --allow $DISTCC_ALLOW + ;; +stop) + killall -q /usr/bin/distccd + ;; +restart) + $0 stop + $0 start + ;; +*) + echo "usage: $0 [start|stop|restart]" + ;; +esac + +# End of file |