0

I've some SysVinit scripts with start/stop, they are used for remote server deployment, as now i am using runit in other deployment purpose, and don't want to duplicate the scripts (maintenance reason). Is it possible that runit invokes these scripts? or other approach? Thank you in advance.

perigee
  • 9,438
  • 11
  • 31
  • 35

1 Answers1

0

It is unlikely that you can use these scripts unmodified with runit. Runit expects the service started with run to remain in the foreground and not exit.

A SysVInit script expects the opposite behavior. Because it does not perform any process monitoring (and the lack of process monitoring is presumably why you are switching to runit), SysVInit scripts expect services to run in the background, and will exit after starting the service.

These are two fundamentally incompatible models.

You could consider using systemd instead of runit, which provides good process monitoring while also being able to follow processes that fork.

larsks
  • 277,717
  • 41
  • 399
  • 399
  • thx a lot for the clarification, as I use `ansible` to control the deployment, the best approach i can work out, is using `jinja2` template to switch between two deployment, so every detail will be managed inside same template file. Kind of workaround. – perigee Mar 10 '16 at 22:29