diff options
author | Silvino <silvino@bk.ru> | 2019-06-11 00:27:06 +0100 |
---|---|---|
committer | Silvino <silvino@bk.ru> | 2019-06-11 00:27:06 +0100 |
commit | 5adacc390c152b1540372d653712cb41fcb76b7b (patch) | |
tree | 6c7fa82642984b059889796b66dc204dadc1b933 /core/conf/rc.d/distccd | |
parent | a55b4d39a97361fd4f04c6547835204b9e5371ac (diff) | |
download | doc-5adacc390c152b1540372d653712cb41fcb76b7b.tar.gz |
ports distcc and ccache revision
Diffstat (limited to 'core/conf/rc.d/distccd')
-rwxr-xr-x | core/conf/rc.d/distccd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/core/conf/rc.d/distccd b/core/conf/rc.d/distccd new file mode 100755 index 0000000..65a166d --- /dev/null +++ b/core/conf/rc.d/distccd @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# /etc/rc.d/distccd: start/stop distcc daemon +# + +. /etc/distcc.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 the distcc's README package." + exit 1 +fi + +DISTCC_USER="${DISTCC_USER:=nobody}" +DISTCC_LOG_LEVEL="${DISTCC_LOG_LEVEL:=notice}" + +case $1 in +start) + /usr/sbin/distccd --daemon --user "$DISTCC_USER" --allow "$DISTCC_ALLOW" --log-level "$DISTCC_LOG_LEVEL" + ;; +stop) + killall -q /usr/sbin/distccd + ;; +restart) + $0 stop + $0 start + ;; +*) + echo "usage: $0 [start|stop|restart]" + ;; +esac + +# End of file |