2014-09-30 08:05:00 +02:00
|
|
|
#!/bin/sh
|
2015-04-23 09:54:38 +02:00
|
|
|
PROG="distccd"
|
|
|
|
USER="nobody"
|
|
|
|
OPTIONS="--no-detach"
|
|
|
|
OPTIONS="$OPTIONS --daemon"
|
|
|
|
OPTIONS="$OPTIONS --user $USER"
|
|
|
|
ALLOW_FILE=/etc/distcc/clients.allow
|
|
|
|
if [ -f "$ALLOW_FILE" ]; then
|
|
|
|
ALLOW_OPTIONS=$(sed -e 's/#.*$//' -e '/^\s*$/d' -e 's/^/--allow /' < $ALLOW_FILE)
|
|
|
|
fi
|
|
|
|
if [ -z "$ALLOW_OPTIONS" ]; then
|
|
|
|
# Default to allow localhost
|
|
|
|
ALLOW_OPTIONS="--allow 127.0.0.1"
|
|
|
|
fi
|
|
|
|
OPTIONS="$OPTIONS $ALLOW_OPTIONS"
|
|
|
|
exec $PROG $OPTIONS
|