Jump to content

Kill signals and custom scripts...


Sonicscream

Recommended Posts

Hi guys.

 

I made a starbound template and it has a problem. When I go to shut down the service, it does not make the server save the world -- instead it kills the service's process... this is bad because it could corrupt the saves on the service's in-game world.

 

I thought about using custom scripts to send a "sigint" kill signal to it like below:

 

!#/bin/bash

kill -SIGINT ${Service_Pid}

exit

 

Obviously it isn't working.. I've probably typed something wrong :p .

 

 

 

Does anyone here know of an alternative?

 

Many thanks.

Link to comment
Share on other sites

I looked at this page and saw Service_Pid:

http://help.tcadmin.com/Service_Manager_Scripting_Variables

 

I put the script under "Before Stopped" in the service's template.

 

Is there any proper way to achieve what I am trying to do? I've not scripted in tcadmin before, and hardly even on linux in shell.

 

Thanks.

Edited by Sonicscream
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, 14 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