I have a python script sc.py on my debian server.
I would like :
- To run it as a daemon and keep it running indefinitely
- To run it N times (as sub processes, children, forks) in //
- To monitor the whole processes (in order to restart any dying process)
Do you know software that would enable me to do so?
I don’t know if I have to look for a solution on the python side (any python module or configuration) or if there is a debian package somewhere which does that job?
Advertisement
Answer
You can use supervisord
for this.
It daemonizes Python processes for you, and also handles subprocesses.