I have a working Python based program that I want to run as a daemon. Currently I’m doing it in a very hackish manner of starting it in with screen-d -m name session and killing it with pkill -9 -f name.
Eventually I’m doing to have to move this to the better system we use here (thus I’m not willing to modify the program) but in the interim, I’m looking for a cleaner way to do this.
My current thinking is kick it off as a background task from an inti.d script but how do I write the part to bring it back down?
See PEP 3143 — Standard daemon process library