Spectrum Script
The following script is used as the basis for the procedure described under How to Run Spectrum Technology Platform as a Linux Service.
Note: For Linux, the default Spectrum Technology Platform install folder is /home/<user>/Spectrum.
#! /bin/bash
#
# spectrum Bring up/down the Spectrum platform
#
# chkconfig: 35 90 10
# description: Starts and stops the spectrum
#
# /etc/rc.d/init.d/spectrum
# See how we were called.
SPECTRUM_ROOT=/root/Spectrum
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: spectrum {start|stop|restart}"
exit 1
esac
exit $RETVAL