Jump to content

Execute Script on shutdown


jeromehaynes

Recommended Posts

TCAdmin kills the process instead of a graceful shutdown, due to this games like 7 days to die can not save their worlds properly, so the day count resets to 0. On the 7D2D webconsole issuing a shutdown command saves it gracefully. Is it possible to run a script or something to do this when the restart button is clicked?

 

 

Kind Regards,

Jerome Haynes

Link to comment
Share on other sites

Ah I see what you mean, problem is 7DTD is on my Windows VM, and whilst I've enabled the text part, there's no way of verifying if it actually executes the command and works (seeing as 7DTD use telnet no real console option) and even enabling the web console to see if I can view an output to see if it does print the command doesn't work.

Link to comment
Share on other sites

The stop console commands work on Windows and Linux but it only works for games that have a pure text console like minecraft. Window based consoles like the ones from Call of Duty games don't work. Fancy text consoles like Counter Strike Source don't work (shows the fps and map at the top).

 

One thing you can try is enable interact with desktop in the game settings. Save and click on Update Existing Services.

With interact with desktop enabled it will try to close the game server's main window instead of killing the process.

You can confirm it's doing this by enabling debug mode in TCAdminMonitor.exe.config, restart service manager, then look in Logs/ServiceManager/console.log after stopping a game server. You should see something like this:

ServiceId ### - Stopping the service by closing the main window...
ServiceId ### - Stopped the service by closing the main window. 

It depends on the game if it actually shuts down gracefully when the main window is closed.

Link to comment
Share on other sites

  • 5 years later...

I have noticed if lets say if you do some stuff inside the game, and when you stop the server, then Tcadmin do not stop the server on a humain way, if you let say if you write something on a sign inside the game the text is not saved before the server is shutdown on a proper way. As I can see in the logs on the server the server is saving some stuff if you shutdown the server on a humain way but if you click stop in the tcadmin controlpanel then the shutdown will happend witouth the game saving things, so I wondering is it a way to get tcadmin to shutdown the server in a humain and normal way ? as if I do a /shutdown inside the game in comman aera it works and the shutdown is normal. Is it any way we can make a command that tcadmin is using when we click stop in the controlpanel ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 18 Guests (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use