blob: aebad6fac7d02b32067378e617104028fb1736e1 (
plain)
1 #!/usr/bin/env bash
2 #
3 # /etc/rc.d/distccd: start/stop distcc daemon
4 #
5
6 . /etc/rc.conf
7 if [ -z "$DISTCC_ALLOW" ]; then
8 echo "Please define a range of IPs allowed to connect to this distccd"
9 echo "host in DISTCC_ALLOW in /etc/rc.conf. More detailed information"
10 echo "can be found in the distcc's README package."
11 exit 1
12 fi
13
14 DISTCC_USER="${DISTCC_USER:=nobody}"
15 DISTCC_LOG_LEVEL="${DISTCC_LOG_LEVEL:=notice}"
16
17 case $1 in
18 start)
19 /usr/sbin/distccd --daemon --user "$DISTCC_USER" --allow "$DISTCC_ALLOW" --log-level "$DISTCC_LOG_LEVEL"
20 ;;
21 stop)
22 killall -q /usr/sbin/distccd
23 ;;
24 restart)
25 $0 stop
26 $0 start
27 ;;
28 *)
29 echo "usage: $0 [start|stop|restart]"
30 ;;
31 esac
32
33 # End of file
|