box.ctl submodule also contains two functions for the two
server trigger definitions:
Please, familiarize yourself with the mechanism of trigger functions before using them.
Create a “shutdown trigger”. The
trigger-functionwill be executed whenever os.exit() happens, or when the server is shut down after receiving a SIGTERM or SIGINT or SIGHUP signal (but not after SIGSEGV or SIGABORT or any signal that causes immediate program termination).
- trigger-function (function) – function which will become the trigger function
- old-trigger-function (function) – existing trigger function which will be replaced by trigger-function
nil or function pointer
If the parameters are (nil, old-trigger-function), then the old trigger is deleted.
Details about trigger characteristics are in the triggers section.