File rootd of Package root

#!/bin/sh
#
# rootd          Start/Stop the ROOT file serving daemon
#
### BEGIN INIT INFO
# Provides:       rootd
# Required-Start: $network $syslog $remote_fs
# Should-Start:   
# Required-Stop:  $network $syslog $remote_fs
# Should-Stop:    
# Default-Start:  3 5
# Default-Stop:
# Short-Description: provides remote access to ROOT files
# Description:    The rootd server provides remote access to ROOT files.
### END INIT INFO

ROOTD=/usr/bin/rootd

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

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

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

[ -x $ROOTD ] || exit 0

prog="rootd"

case "$1" in
    start)
	echo -n "Starting service $prog"
	startproc $ROOTD $ROOTDOPTS
	rc_status -v
   	;;
    stop)
	echo -n "Stopping service $prog"
       	killproc $ROOTD
      	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 $ROOTD
        rc_status -v
        ;;
    reload)
        rc_status -v
        ;;
    status)
        echo -n "Checking for $prog: "
        checkproc $ROOTD
        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