Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Linux startup script for ASSS Server + SSBilling2

 
Post new topic   Reply to topic Printable version
 View previous topic  Cross Platform Lvz Toolkit Post :: Post Continuum Patching and Thoughts on a B...  View next topic  
Author Message
fatrolls
Novice


Age:36
Gender:Gender:Male
Joined: Jul 25 2013
Posts: 35
Offline

PostPosted: Sun Apr 06, 2014 12:52 am    Post subject: Linux startup script for ASSS Server + SSBilling2 Reply to topic Reply with quote

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
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 40 page(s) served in previous 5 minutes.

phpBB Created this page in 0.463872 seconds : 25 queries executed (85.5%): GZIP compression disabled