Server Help

Misc User Apps - Linux startup script for ASSS Server + SSBilling2

fatrolls - Sun Apr 06, 2014 12:52 am
Post subject: Linux startup script for ASSS Server + SSBilling2
Figured if your running your subspace server on Linux and say it unexpectedly reboots and you find your zone offline and it will be offline until you load it back up.. this prevents ever having to monitor it and safety knowing it will always be online. I usually make one of these scripts for every server project I built.

Here is one for Cent OS 6 Linux probably supports other Linux's too

How to use it?
Just type and now it's enabled.
chkconfig --add continuum

This to start it right now
service continuum start
This to restart it right now
service continuum restart
This to stop it right now
service continuum stop

Almost forgot to put this script into /etc/init.d/ without any file extension. Before doing the chkconfig -add
If /etc/init.d doesn't exist try /etc/rc.d/init.d which is the same thing.

If the chkconfig fails.. I know it can happen probably wont but try.
chkconfig --add continuum --levels 35

Also make sure the file is formatted with LF as new line, not CRLF what windows uses or just CR what Mac pcs use.

Also before #!/bin/bash make sure there is no empty line.

Another thing you do have to edit the script to the relative paths on your Linux box the folder names may be different and the CONTINUUM_HOME might be different.

Code: Show/Hide

#!/bin/bash
#
#continuum:          Startup script for Continuum Server Application.
#
#chkconfig: 35 80 05
#description:      Startup script for Continuum Server Application.

CONTINUUM_HOME=/tools/continuum;
export CONTINUUM_HOME

start() {
        echo -n "Starting Continuum ASSS Server: "
        cd $CONTINUUM_HOME/asss-1.5
        ./bin/asss -d
        echo -n "Starting Continuum Billing Server: "
        cd  $CONTINUUM_HOME/biller
        ./ssbilling2-linux &
        sleep 2
        echo "done"
}

stop() {
        echo -n "Stopping Continuum Server & Billing Server: ";
        kill -9 `pidof asss` `pidof ssbilling2-linux`
        cd $CONTINUUM_HOME/asss-1.5
        rm -f asss.pid
        echo "done"
}

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

All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group