Author Topic: [done] "Close after this game" Option for Headless Server  (Read 1242 times)

titi_son

  • Draco Rider
  • *****
  • Posts: 283
  • titi_son
    • View Profile
[done] "Close after this game" Option for Headless Server
« 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?
« Last Edit: 24 June 2013, 11:40:53 by tomreyn »
My first Tilseset: SPRING :) (included in Megaglest )

Secret Hint: To play online join the IRC #megaglest-lobby on freenode which is the lobby chat ingame. So you can chat with or wait for people in the lobby without running megaglest all the time.

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: "Close after this game" Option for Headless Server
« Reply #1 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.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: "Close after this game" Option for Headless Server
« Reply #2 on: 15 November 2012, 09:29:25 »
maybe we should provide a start script to run headless servers?
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

tomreyn

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: "Close after this game" Option for Headless Server
« Reply #3 on: 15 November 2012, 11:03:56 »
You mean something like ... this?
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.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: "Close after this game" Option for Headless Server
« Reply #4 on: 21 June 2013, 06:12:22 »
Is this feature request considered done then?

titi_son

  • Draco Rider
  • *****
  • Posts: 283
  • titi_son
    • View Profile
Re: "Close after this game" Option for Headless Server
« Reply #5 on: 21 June 2013, 13:34:05 »
yes, --headless-server-mode=exit is what i wanted...
My first Tilseset: SPRING :) (included in Megaglest )

Secret Hint: To play online join the IRC #megaglest-lobby on freenode which is the lobby chat ingame. So you can chat with or wait for people in the lobby without running megaglest all the time.

 

anything