I use Supervisor to manage processes. Is it possible to have Supervisor run a command when it receives a SIGTERM (or another signal)?
Do something when Supervisor receives SIGTERM
supervisord
Related Topic
- Deployment – Supervisor Not Loading New Configuration Files
- Linux – Limit which processes a user can restart with supervisor
- Tomcat – Controlling tomcat with supervisor
- Python – Can’t start Gunicorn via Supervisor after server reboot
- Docker – Managing daemons with supervisor: no foreground mode available
- Starting and stopping piped processes with Supervisor
- Supervisord sending SIGKILL instead of SIGTERM
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.