MegaGlest Forum

MegaGlest => Feature requests => Topic started by: titi_son on 13 November 2012, 20:09:14

Title: [done] "Close after this game" Option for Headless Server
Post by: titi_son on 13 November 2012, 20:09:14
I think it would be a great future for the headless server if you just can write something like
Code: [Select]
stopaftergamein the Terminal and then the headless server close after the game which is running on it.

We often run a headless here if we see that the servers are all full but if we want to shut down the Computer we often see that a new game has Started on the server and we don't want to break this game. But if we could about a hour before we shut down just use this command it would be nice.

I am not sure if i am the only one who want this feature. So what do you think?
Title: Re: "Close after this game" Option for Headless Server
Post by: tomreyn on 13 November 2012, 20:16:02
I guess this could be useful for people who run a headless server on a desktop computer.

You can already achieve this now with a little bit of scripting, though. Run the headless server with --headless-server-mode=vps,exit in a loop which can get interrupted by, e.g., presence of a file
Code: [Select]
~/.megaglest/quit_after_this_gameThen when you want to shutdown, just create this file and the headless server will quit after the currently running or the next started game is over.
Title: Re: "Close after this game" Option for Headless Server
Post by: titi on 15 November 2012, 09:29:25
maybe we should provide a start script to run headless servers?
Title: Re: "Close after this game" Option for Headless Server
Post by: tomreyn on 15 November 2012, 11:03:56
You mean something like ... this (http://wiki.megaglest.org/Dedicated_Server#Game_server_automation)?
Admittedly the current script is rather simple and it surely could be improved (or rewritten). Then it could make a good addition to the subversion repository.
Title: Re: "Close after this game" Option for Headless Server
Post by: softcoder on 21 June 2013, 06:12:22
Is this feature request considered done then?
Title: Re: "Close after this game" Option for Headless Server
Post by: titi_son on 21 June 2013, 13:34:05
yes, --headless-server-mode=exit is what i wanted...