X-Git-Url: http://git.pld-linux.org/?p=packages%2Fdistcc.git;a=blobdiff_plain;f=distcc.init;h=fdc6c12347f657e0bb4876b510bf6b55f5631988;hp=7cc0f7a7ed5ed706a167c76e19f13b54c2e64d3c;hb=HEAD;hpb=f0ea67d48b052e67e86c9b4fb2fc54fb1307c97e diff --git a/distcc.init b/distcc.init index 7cc0f7a..fdc6c12 100644 --- a/distcc.init +++ b/distcc.init @@ -2,13 +2,12 @@ # # $Id$ # -# distccd distccd +# distccd distccd # # chkconfig: 345 55 45 # -# description: distccd -# - +# description: distccd +# # Source function library . /etc/rc.d/init.d/functions @@ -29,10 +28,8 @@ else exit 0 fi -OPTION1="--daemon" - [ -z "$DISTCC_HOSTS_ALLOW" -a -n "$HOSTS_ALLOW" ] && DISTCC_HOSTS_ALLOW="$HOSTS_ALLOW" - + RETVAL=0 # See how we were called. case "$1" in @@ -40,9 +37,11 @@ case "$1" in # Check if the service is already running? if [ ! -f /var/lock/subsys/distccd ]; then msg_starting distccd + touch distcc /var/log/distcc + chown distcc /var/log/distcc 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 RETVAL=$? - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/distccd + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/distccd else msg_already_running distccd fi @@ -54,7 +53,7 @@ case "$1" in rm -f /var/run/distccd.pid /var/lock/subsys/distccd >/dev/null 2>&1 else msg_not_running distccd - fi + fi ;; restart) $0 stop @@ -83,4 +82,4 @@ esac exit $RETVAL # This must be last line ! -# vi:syntax=sh:tw=78:ts=8:sw=4 +# vi:syntax=sh:tw=78:ts=4:sw=4