-
Notifications
You must be signed in to change notification settings - Fork 9
Running With Init
It's quite possible (and is desirable, if you don't want to do a replacement) 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 /sbin/runsvdir-start to /etc/inittab, or by adding /sbin/runsvdir-start as command to /etc/rc.local, or by adding /sbin/runsvdir-start to the system's StartupItems.
In any case, you first need to copy the stage 2 script to /sbin/runsvdir-start, and create the services directory /service/:
# install -m0750 /package/admin/runit/etc/2 /sbin/runsvdir-start
# mkdir -p /service
If your system uses a sysvinit alike init scheme with a /etc/inittab file, do:
# cat >>/etc/inittab <<EOT SV:123456:respawn:/sbin/runsvdir-start EOT
and tell init to re-read its configuration, e.g.:
# init q
If your system uses a BSD alike init scheme with a /etc/rc.local script, do:
# cat >>/etc/rc.local <<EOT csh -cf '/sbin/runsvdir-start &' EOT
and reboot your system.
About runit:
Benefits
Frequently Asked Questions (FAQ)
Building runit:
Setting up runit:
Replacing Init
Running WITH Init
Runlevels
Service Dependencies
Execution Modifiers
Using runit commands:
runit
runit-init
sv
runsvdir
runsvchdir
runsv
svlogd
chpst
utmpset