12 # Source function library
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
19 [ -f /etc/sysconfig/distccd ] && . /etc/sysconfig/distccd
21 # Check that networking is up.
22 if is_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
24 msg_network_down distccd
31 [ -z "$DISTCC_HOSTS_ALLOW" -a -n "$HOSTS_ALLOW" ] && DISTCC_HOSTS_ALLOW="$HOSTS_ALLOW"
34 # See how we were called.
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/distccd ]; then
40 touch distcc /var/log/distcc
41 chown distcc /var/log/distcc
42 daemon /usr/bin/distccd --daemon --user distcc --log-file /var/log/distcc `for ip in $DISTCC_HOSTS_ALLOW; do echo -n "--allow $ip "; done` $DISTCC_OPTS
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/distccd
46 msg_already_running distccd
50 if [ -f /var/lock/subsys/distccd ]; then
53 rm -f /var/run/distccd.pid /var/lock/subsys/distccd >/dev/null 2>&1
55 msg_not_running distccd
68 if [ -f /var/lock/subsys/distccd ]; then
73 msg_not_running distccd >&2
78 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
84 # This must be last line !
85 # vi:syntax=sh:tw=78:ts=4:sw=4