Auto Starting After Rcon Quit

strikeforcestrikeforce Join Date: 2003-11-11 Member: 22523Posts: 162Members, Constellation
Is it in the script or config files
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: 373Posts: 874Members, 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.
    [NAPT]Vadakill

    NS Win32/Linux Server setup guides:
    http://www.vadakill.com/nsguides
  • strikeforcestrikeforce Join Date: 2003-11-11 Member: 22523Posts: 162Members, 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: 31572Posts: 60Members
    @Vadakill

    QUOTE

    The hlds_run shell script has a built in "restarter" while running the server binaries directly do not.



    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?
    user posted image
    Urbangamer Game Servers
    (15:00:51) (+Fb`): guns dont kill people, UrbanGamer does
    82.138.247.160:27025 Urbangamer Game Servers public NS.
  • strikeforcestrikeforce Join Date: 2003-11-11 Member: 22523Posts: 162Members, 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: 22523Posts: 162Members, Constellation
    I know its a double post however I've solved it from some posts at steampowered.

    CODE

    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




    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: 11780Posts: 614Members, NS1 Playtester, Squad Five Silver Advanced user
    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).

    run_hlds
    CODE

    #!/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
    ENSL Head Admin 2006-2012
Sign In or Register to comment.