Auto Starting After Rcon Quit

strikeforcestrikeforce 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?

Comments

  • VadakillVadakill The Almighty BSO Join Date: 2002-04-02 Member: 373Members, NS1 Playtester
    Depends on how the servers are started. The hlds_run shell script has a built in "restarter" while running the server binaries directly do not.
  • strikeforcestrikeforce Join Date: 2003-11-11 Member: 22523Members, Constellation
    I'll have to find out cause I tried it again today and when I type rcon quit it shutsdown but when I type it in the other server it reboots? Must be something in the hlds_run script where instead of shutdown it goes to reboot.
  • SionSion Join Date: 2004-09-10 Member: 31572Members
    @Vadakill

    <!--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?
  • strikeforcestrikeforce Join Date: 2003-11-11 Member: 22523Members, Constellation
    Yeah I don't run autoupdate possibly it could be the reason why it starts. I run the same setup as you script wise. I'll have to double check with autoupdate and see whether that helps or is the cause of it.
  • strikeforcestrikeforce Join Date: 2003-11-11 Member: 22523Members, Constellation
    I know its a double post however I've solved it from some posts at steampowered.

    <!--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
  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    edited June 2005
    Hlds_run keeps the server running. It will restart the server if it crashes but if it's quitted normally, it wont. To restart the server type "_restart" without quotes, then the script knows what you want.

    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-->
Sign In or Register to comment.