Revision 91ec76eafab1a80964967b7e117c7ed0938bcaac authored by Axel Naumann on 31 August 2011, 13:29:57 UTC, committed by Axel Naumann on 31 August 2011, 13:29:57 UTC
Agree in meaning on "single ESC has a meaning":
* rename to reduce ambiguity
* initialize properly, test for the correct value.
Fixes


git-svn-id: http://root.cern.ch/svn/root/branches/v5-30-00-patches@40778 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent f4ddfc3
Raw File
proofd.in
#! /bin/sh
#
# proofd	Start/Stop the PROOF daemon
#
# chkconfig: 345 20 80
# description:	The proofd daemon starts the PROOF worker processes.
#
# processname: proofd
# pidfile: /var/run/proofd.pid
# config:

PROOFD=@bindir@/proofd

# Source function library.
. /etc/init.d/functions

# Get config.
. /etc/sysconfig/network

# Get proofd config
[ -f /etc/sysconfig/proofd ] && . /etc/sysconfig/proofd

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
	exit 0
fi

[ -x $PROOFD ] || exit 0

RETVAL=0
prog="proofd"

start() {
        echo -n $"Starting $prog: "
        # when not built with --prefix, add as last argument the
        # path where ROOT is installed
        daemon $PROOFD $PROOFDOPTS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/proofd
	return $RETVAL
}

stop() {
    	test ! -f /var/lock/subsys/proofd && return 0 || true
        echo -n $"Stopping $prog: "
        killproc proofd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/proofd
	return $RETVAL
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status proofd
	;;
  restart|reload)
	stop
	start
	;;
  condrestart)
	if [ -f /var/lock/subsys/proofd ]; then
            stop
            start
        fi
	;;
  *)
	echo  $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
	exit 1
esac

exit $RETVAL
back to top