Auto Starting After Rcon Quit
strikeforce
Join Date: 2003-11-11 Member: 22523Members, Constellation
<div class="IPBDescription">Is it in the script or config files</div> I run 2 servers one I have setup the bash script and all of that the second one someone else has configured. When the server that I hadn't setup but take care of if I type rcon quit in console it'll shutdown the server then restart. With the first server if I type rcon quit it shuts down but doesn't restart.
Is it a config setting or a bash option to get it to reboot after its been shutdown?
Is it a config setting or a bash option to get it to reboot after its been shutdown?
Comments
<!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->
The hlds_run shell script has a built in "restarter" while running the server binaries directly do not.
<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
I find this to work only if you have -autoupdate in the command line.
or is it because I run my processed as screens (screen -dmS ./hlds_run ....)
that it is circumventing this?
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
screen -A -m -d -S ns /home/ns/hlds_l_wans/steam/hlds_l/hlds_run -autoupdate -game ns +exec server.cfg +ip 123.123.123.123 +port 27015 +maxplayers 18 +map co_ulysses.bsp
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Assuming you have a bash script above thats pretty much mine. I put autoupdate in I'm not sure of the placement but I tried at the end it didn't work so I tested it in a few spots and it works if its placed there and the game loads up as well.
When the -autoupdate command is put in in the script it runs fine and also when you type rcon quit it'll reboot the server not shutdown the serverl.
E.G just finished with a tourney and instead of manually turning everything off just type rcon quit and its all done.
HTH someone
You can also build your own script without any fancy features (like above).
<i>run_hlds</i>
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
#!/bin/sh
# Run this with "nohup ./run_hlds&" without quotes
# Change CPU if you have different cpu.
# (i486 = general, i686 = pentium, amd64 = 64bit-AMD, amd = AMD)
OPTS=-game ns
CPU=i486
HL_PATH=$HOME/hlds_l
cd $HL_PATH
export LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH"
while true;
do
echo Starting hlds...
./hlds_$CPU $OPTS > /dev/null
sleep 5
done
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->