Shut down server via linux console

    Joined
    Dec 8, 2013
    Messages
    7
    Reaction score
    0
    Hey everybody, I'm just gonna post this here for the lack of a better forum to put it into.

    I'm running a private server on my web server and am currently working on a script that creates a backup for the entire server world every few days or so because I had to reset the server a while ago because there was a massive SQL failure.

    Now, I know that I can shut down the server via an admin command while in game but I wanted to ask if it was possible to poll a server shutdown via the console without using the server emergency hook which can't be too good for the database if it's called EMERGENCY HOOK! :P



    The idea would be to shut down the server, copy the database (the game becomes unplayable while the copying is going on because of massive lags. After the copying is done I'd want the script to start the server back up.

    Scripting the copying etc. isn't difficult but I was wondering about shutting down the server while it's going without canceling the process. Could you run an admin command from outside the game? :eek:



    Well thanks for reading and I hope somebody can help me with this.
     
    Joined
    Jun 24, 2013
    Messages
    710
    Reaction score
    11
    You can use the StarNet.jar remote console.

    http://star-made.org/content/starmade-009378-fixes-shield-balance-new-admin-tools



    If you try to run it once, it will show you the correct syntax for any commands.

    In your server.cfg, you can activate it by setting super admin on true and setting a password for it (there are two lines in the config for this).



    In your case, you\'d just want to issue the /shutdown (number) command via StarNet.jar.



    Hope that was the info you needed, good luck :P