about summary refs log blame commit diff stats
path: root/core/conf/rc.d/distccd
blob: 65a166d1dd985d958e4006a1c44b7fe61af452bc (plain) (tree)
































                                                                                                                
#!/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