mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-26 13:45:17 +02:00
17 lines
460 B
Bash
Executable file
17 lines
460 B
Bash
Executable file
#!/bin/sh
|
|
exec 2>&1
|
|
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
|