13 # Source function library
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/distccd ] && . /etc/sysconfig/distccd
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25 msg_network_down distccd
34 [ -z "$DISTCC_HOSTS_ALLOW" -a -n "$HOSTS_ALLOW" ] && DISTCC_HOSTS_ALLOW="$HOSTS_ALLOW"
37 # See how we were called.
40 # Check if the service is already running?
41 if [ ! -f /var/lock/subsys/distccd ]; then
43 daemon /usr/bin/distccd --daemon --user nobody --log-file /var/log/distcc `for ip in $DISTCC_HOSTS_ALLOW; do echo -n "--allow $ip "; done` $DISTCC_OPTS
45 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/distccd
47 msg_already_running distccd
51 if [ -f /var/lock/subsys/distccd ]; then
54 rm -f /var/run/distccd.pid /var/lock/subsys/distccd >/dev/null 2>&1
56 msg_not_running distccd
69 if [ -f /var/lock/subsys/distccd ]; then
74 msg_not_running distccd >&2
79 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
85 # This must be last line !
86 # vi:syntax=sh:tw=78:ts=8:sw=4