Quote:
Originally Posted by Fyren
No.
You can implement a signal handler in an extension, I guess. On Linux, you could use bash's trap (probably also available in most shells) to set the server to ignore whatever signals you want before you start it.
It seems really weird that you would want this, though.
|
I don't want to ignore the signals but actually use them to notify my scripts to do some actions.
One common case is when you run SRCDS in a Docker container, whenever a stop command is performed it sends a SIGTERM signal to the process and I would like to run some triggers and cleanup before it shuts down gracefully.
Sure, I could find other ways to do the same like constantly polling for some specific files that have the only purpose of triggering actions, but it seems a bit "hackish" way to do what I want to achieve.