(file) Return to pegasus CVS log (file) (dir) Up to [Pegasus] / pegasus / rpm

File: [Pegasus] / pegasus / rpm / pegasus (download)
Revision: 1.2.2.2, Thu Oct 18 08:48:47 2001 UTC (22 years, 7 months ago) by sage
Branch: dev
CVS Tags: dev_dead, SNAPSHOT_1_04
Changes since 1.2.2.1: +5 -3 lines
Adapted pegasus layout to linux standards

#! /bin/sh
#
# Author: Markus Mueller <markus_mueller@de.ibm.com>
#
# /etc/init.d/pegasus
#
#   and symbolic its link
#
# /usr/sbin/rcsshd
#
### BEGIN INIT INFO
# Provides: pegasus
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the cimom daemon
### END INIT INFO

. /etc/rc.status
. /etc/rc.config

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

# Force execution if not called by a runlevel directory.
test $link = $base && START_PEGASUS=yes
test "$START_PEGASUS" = yes || exit 0

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status

export PEGASUS_HOME=/var/lib/pegasus

# First reset status of this service
rc_reset
case "$1" in
    start)
	echo -n "Starting PEGASUS daemon"
	## Start daemon with startproc(8). If this fails
	## the echo return value is set appropriate.

	#startproc /usr/bin/cimserver
        #export PEGASUS_HOME=/var/lib/pegasus
	#handle that we cannot specify the location of the configuration
	ln -sf /etc/pegasus/pegasus.conf /var/lib/pegasus/pegasus.conf
        cimserver -D /var/lib/pegasus -d logdir=/var/pegasus/logs

	# Remember status and be verbose
	rc_status -v
	;;
    stop)
	echo -n "Shutting down PEGASUS daemon:"
	## Stop daemon with killproc(8) and if this fails
	## set echo the echo return value.

	#killproc -INT /usr/bin/cimserver
	killall -2 cimserver

	# Remember status and be verbose
	rc_status -v
	;;
    restart)
	## If first returns OK call the second, if first or
	## second command fails, set echo return value.
	$0 stop  &&  $0 start

	# Remember status and be quiet
	rc_status
	;;
    reload)
        echo -n "Reload service PEGASUS"
        #killproc -p /var/run/pegasus.pid -HUP /usr/bin/cimserver
	$0 stop  &&  $0 start
	#
	rc_status -v
	;;
    status)
	echo -n "Checking for service PEGASUS: "
	checkproc /usr/bin/cimserver && echo OK || echo No process
	;;
    *)
	echo "Usage: $0 {start|stop|status|restart|reload}"
	exit 1
	;;
esac
rc_exit

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2