G. Pape
runit

runit - use with traditional init


It's possible to use runit's service supervision without replacing the init scheme of the system. Simply run the stage 2 of runit as a service with your current init.

Normally this is done by either adding an entry for /etc/runit/2 to /etc/inittab, or by adding /etc/runit/2 as command to /etc/rc.local, or by adding /etc/runit/2 to the system's StartupItems.

In any case, you first need to copy the stage 2 script to /etc/runit/2:

  # mkdir -p /etc/runit
  # cp -p /package/admin/runit/etc/2 /etc/runit/

How to use with sysvinit
How to use with *BSD init
How to use with MacOSX init

Using with sysvinit

If your system uses a sysvinit alike init scheme with a /etc/inittab file, do:
  # cat >>/etc/inittab <<EOT
  SV:123456:respawn:/etc/runit/2
  EOT
and tell init to reread its configuration, e.g.:
  # init q

Using with *BSD init

If your system uses a BSD alike init scheme with a /etc/rc.local script, do:
  # cat >>/etc/rc.local <<EOT
  csh -cf '/etc/runit/2 &'
  EOT
and reboot your system.

Using with MacOSX init

On MacOSX 10.2 create an entry for runit in /System/Library/StartupItems/:
 # cd /System/Library/StartupItems
 # mkdir -p runit
 # cp -p /package/admin/runit/etc/macosx/StartupItems/* runit/
and reboot your system.
Gerrit Pape <pape@smarden.org>
$Id: useinit.html,v 1.3 2003/06/22 18:25:31 pape Exp $