Automated Server Shutdown

Place for sharing your game modifications for Life is Feudal: Your Own

Clifford
 
Posts: 2
Joined: 19 Jun 2016, 17:47

Automated Server Shutdown

Post by Clifford » 19 Jun 2016, 17:50

What is the best or easiest way to implement a scheduled/automated graceful shutdown of a dedi server?


Clifford
 
Posts: 2
Joined: 19 Jun 2016, 17:47

Re: Automated Server Shutdown

Post by Clifford » 19 Jun 2016, 19:47

Perhaps more to the point; is there a way to post a command (such as "quit();" or "restartserver(30);") to the server console via .cmd/.bat?

I've used FireDaemon for some time for other things, but even its "Graceful Shutdown" option for consoles is limited to ctrl+c/ctrl+brk. So to my knowledge FireDaemon is not the best choice on this one(?).

User avatar
Cattoaster
 
Posts: 110
Joined: 03 Nov 2014, 16:13
Location: Medieval Germany

Re: Automated Server Shutdown

Post by Cattoaster » 19 Jun 2016, 20:10

I don't know a way to post directly a command to the server console, but you can use a telnet session for it. Connect via telnet, execute your commands etc. written down in cmd/bat file. This cmd/bat file can be executed by FireDaemon Pro. That could work.


Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Re: Automated Server Shutdown

Post by Alakar » 19 Jun 2016, 23:56

http://arkhaya.com/downloads/shutdown.zip

Extract shutdown.cs.dso to server and add line to main.cs
saying
Code: Select all
exec("shutdown.cs");


To restart server enter game, toggle GM mode on. Open up client console and enter
Code: Select all
commandtoserver('RestartServer',MINUTES);

where Minutes is a value in minutes that you want to restart in.

to Cancel
Code: Select all
commandtoserver('CancelRestart');


-Alakar

Return to Game mods

cron