Do something when Supervisor receives SIGTERM

supervisord

I use Supervisor to manage processes. Is it possible to have Supervisor run a command when it receives a SIGTERM (or another signal)?

Best Answer

No, it's not possible to customize behaviour of Supervisor when it receives signal(s), without changing source code and adding that ability.

Only thing you can do is specify is the kill signal for the process when it is going to be stopped, via "stopsignal" option.