qpsmtpd Wiki

[[deploy:runit]]

You are here: start » deploy » runit

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

You don't have an account yet? Just get one: Register

Forgotten your password? Get a new one: Set new password

runit

Overview

runit is a cross-platform Unix init scheme with service supervision, designed as a replacement for sysvinit, and other init schemes. It runs on GNU/Linux, *BSD, MacOSX, Solaris, and can easily be adapted to other Unix operating systems.

runit can replace or work with an existing init scheme such as sysvinit, *BSD init, or MacOSX init.

Benefits

Some benefits of runit include:

  • having processes restarted if something fails
  • having a standard, consistent method for sending signals
  • avoiding PID file races
  • a well documented license agreement

Additional information is available at:

daemontools is an alternate service supervision package that comes with the typical qmail install. Its FAQ provides some good information on the general benefits of service supervision.

Configuration

Using with forkserver

Once runit is running, getting it to supervise qpsmtpd-forkserver is as simple as creating a run script in the right directory:

# mkdir /var/service/qpsmtpd
# cat >/var/service/qpsmtpd/run <<EOT
> #!/bin/bash
> unset PERL_UNICODE
> /path/to/qpsmtpd/qpsmtpd-forkserver --detach -u smtpd -p 25
> EOT
# chmod 755 /var/service/qpsmtpd/run

runit will automatically load the new service creating a runsv service supervisor for the service. The runsvdir process checks for new directories under the service directory at least every five seconds.

Additional Information

SME Server uses a configuration with a single init.d script that is linked to all the rc.d startup scripts combining familiar SysV startup with the benefits of service supervision. Additional information is available at:

http://distro.ibiblio.org/pub/linux/distributions/smeserver//contribs/gordonr/devguide/html/devguide.html#PROCESSES