Is is possible that runit calls script instead of calling directly the service. For example, I have an init script to launch uwsgi. Could i just call this script inside runit init script? Thank you in advance.
runit calls script instead of service command
289 Views Asked by perigee At
2
There are 2 best solutions below
0
On
Init scripts expect the service they start to daemonize. Runit expects a service not to daemonize, but to run in the foreground to supervise and to connect to the controlling terminal. This is why an initscript is not suited to be invoked by a runit service.
Furthermore, the daemon has to be run with exec, otherwise runit wouldn't be able to connect to the controlling terminal. This is also missing in an init script.
A "service" run by
runitis actually a script, which is namedrunand usually located in a dir like/etc/sv/your_service/along with some other files. So yes, you can call your script from that, but I suppose it'd be better to modify your init script so thatrunitruns it as a "service".