I'm trying to come up with a nice init.d script that starts a psgi app, using start_server and starman. It needs to have the following features:
start-stop-daemon
is not available)start_server
as another userIdeally, I'd like to use the stuff that comes with /etc/init.d/functions
to give the script the look and feel of any ol' RedHat init.d script.
More specifically, I'm looking for best practices to:
--daemonize
optionYou could try runit, it's another supervisor. Nowdays it seems a good practice to use one of these things. Here you could read a comparison of different supervisors.
Best practices:
- Daemonize a program that doesn't come with its own --daemonize option
You don't have to daemonize the program, runit takes care of it.
- Run the daemon under another UID.
Here you could use chpst
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With