contrib/distcc/distccd

34 lines
691 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2007-04-10 21:56:44 +02:00
#
# /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 the distcc's README package."
exit 1
2007-04-10 21:56:44 +02:00
fi
DISTCC_USER="${DISTCC_USER:=nobody}"
DISTCC_LOG_LEVEL="${DISTCC_LOG_LEVEL:=notice}"
2007-04-10 21:56:44 +02:00
case $1 in
start)
/usr/sbin/distccd --daemon --user "$DISTCC_USER" --allow "$DISTCC_ALLOW" --log-level "$DISTCC_LOG_LEVEL"
2007-04-10 21:56:44 +02:00
;;
stop)
killall -q /usr/sbin/distccd
2007-04-10 21:56:44 +02:00
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file