File olbdd of Package root

#!/bin/sh
#
# olbdd               Start/Stop the OLBD daemon
#
### BEGIN INIT INFO
# Provides:       proofd
# Required-Start: $network $syslog $remote_fs
# Should-Start:   
# Required-Stop:  $network $syslog $remote_fs
# Should-Stop:    
# Default-Start:  3 5
# Default-Stop:
# Short-Description: runs the XRD control network
# Description:    The olbd daemon runs the XRD control network.
### END INIT INFO

OLBD=/usr/bin/olbd
OLBDLIBS=/usr/lib

# Source function library.
. /lib/lsb/init-functions
. /etc/rc.status

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

# Configure the environment
[ ! -z "$OLBDENVCONFIG" ] && [ -f "$OLBDENVCONFIG" ] && . $OLBDENVCONFIG

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

[ -x $OLBD ] || exit 0

prog="olbdd"

case "$1" in
    start)
	echo -n "Starting service $prog"
	export LD_LIBRARY_PATH=$OLBDLIBS:$LD_LIBRARY_PATH
        startproc $OLBD -b -l $OLBDLOG -R $OLBDUSER -c $OLBDCF $OLBDDEBUG
	rc_status -v
   	;;
    stop)
	echo -n "Stopping service $prog"
       	killproc $OLBD
      	rc_status -v
   	;;
    try-restart|condrestart)
    	$0 status
    	if test $? = 0; then
        	$0 restart
    	else
        	rc_reset
    	fi
    	rc_status
        ;;
    restart)
        $0 stop
        $0 start
        rc_status
        ;;
    force-reload)
        echo -n "Reload service $prog"
        checkproc $OLBD
        rc_status -v
        ;;
    reload)
        rc_status -v
        ;;
    status)
        echo -n "Checking for $prog: "
        checkproc $OLBD
        rc_status -v
        ;;
    probe)
        ;;
    *)
        echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
        exit 1
        ;;
esac
openSUSE Build Service is sponsored by