Is Systemd compatible with Runit?

1.5k Views Asked by At

I have a production environment based on Systemd and a test environment based on Runit (for some reason I cannot change this). My problem is that whenever I create a service I need the Systemd and Runit version duplicating the coding and test effort. Is there a way to have my systemd production service working with Runit in the Test environment in some way? For example, I know that Systemd is compatible with Upstart and SysV so if I have two services for them I can use them on Systemd. I was wondering if the same is possible between Runit and Systemd. If this is possible, how can I do this?

1

There are 1 best solutions below

0
Tony Agudo On

It is trivially easy to use runit's service management suite under systemd. If you're using a Debian or Arch-based system, all you need to do is install the runit-systemd package. What is does is install runit's process supervision suite, sets up an empty service directory, and installs a simple systemd service unit that executes runsvdir on that directory.

However, due to systemd's deliberate design of process supervision as part of PID 1, it is currently not possible to run systemd's service management under other init systems such as runit.