BSD Ports

sysutils/runit 2.1.2_5 DragonFly

Service supervision tools compatible with DJB daemontools

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
BSD3CLAUSE
Categories
sysutils
Package size
188.8 KiB, 780.4 KiB installed

Description

runit is daemontools replacement:

  • service supervision
  • clean process state
  • reliable logging facility
  • fast system bootup and shutdown
  • packaging friendly
  • small code size

It can optionally replace init(8) as process 1.

In the other systems

SystemPortVersion
DragonFlysysutils/runit2.1.2_5
FreeBSDsysutils/runit2.1.2_5
OpenBSDsysutils/runit2.3.1p0
NetBSDsysutils/runit2.1.2

Install

Binary package:

pkg install runit

From DPorts:

cd /usr/dports/sysutils/runit && make install clean

Dependencies

Required by 1

Configuration

No options to configure.

Service scripts
none

Message after installing

Using runit with FreeBSD init:

# mkdir /var/service
# cp -R /usr/local/etc/runit /etc/runit
# echo runsvdir_enable=yes >> /etc/rc.conf

runit is very easily used instead of init on FreeBSD, but the port maintainer
suggests the following alternative method (as opposed to the website method):

1. Copy all of the etc files from /usr/local/etc/runit to /etc/runit;

# cp -R /usr/local/etc/runit /etc/runit

2. Copy runit-init AND runit into /sbin;

# cp /usr/local/sbin/runit* /sbin

3. Create service directories, enable ttyv4 and disable it in ttys:

# mkdir /var/service
# cp -R /etc/runit/getty-ttyv4 /var/service
# sed 's/^ttyv4/#&/' /etc/ttys

(The getty-ttyvx directory will getty on whichever vtty x is on, for example
 # cp -R /var/service/getty-ttyv4 /var/service/getty-ttyv3
 will result in a tty on ttyv3 as well)

4. Don't replace FreeBSD init in place, tell loader to use runit instead:

# echo 'init_path="/sbin/runit-init:/sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init"' >> /boot/loader.conf

5. Reboot!

Note: On FreeBSD, runit-init works in /usr/local/sbin, but
      *only* if /usr/local/sbin is on the same filesystem as /; check with:

# df /usr/local/sbin/runit | sed -ne 's,.* /,/,p' # If this does not return "/"

      If the output is "/", you may skip step 2 and modify step 4:

# echo 'init_path="/usr/local/sbin/runit-init:/sbin/init:/sbin/oninit:/sbin/init.bak:/rescue/init"' >> /boot/loader.conf

      making upgrades easier.