PBSpectrum Script

The following script is used as the basis for this procedure: How to Run Spectrum™ Technology Platform as a Linux Service.


   #! /bin/bash
#
#  pbspectrum Bring up/down PB Spectrum platform
#
# chkconfig: 35 90 10
# description: Starts and stops the spectrum
#
# /etc/rc.d/init.d/pbspectrum
# See how we were called.

SPECTRUM_ROOT=/root/PBSpectrum

start() {
        su - spectrum -c ". $SPECTRUM_ROOT/server/bin/setup;
		ulimit -n 8192;
		$SPECTRUM_ROOT/server/bin/server.start" 
        RETVAL=$?
        return $RETVAL
}

stop() {
        su - spectrum -c ". $SPECTRUM_ROOT/server/bin/setup;
        $SPECTRUM_ROOT/server/bin/server.stop" 
        RETVAL=$?
        return $RETVAL
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
  *)
        echo $"Usage: pbspectrum {start|stop|restart}"
        exit 1
esac

exit $RETVAL