G. Pape
runit
How to replace init

runit - collection of run scripts


getty
sshd
klogd
expireproctitle
dhcpd
dhclient
gdm
statd, mountd
squid
cups
pure-ftpd
This is a collection of run scripts for popular services to have them monitored by the daemontools package. If you have additional run scripts or one of these run scripts works for you on an operating system not stated here, please let me know.

Thanks go to the following people for contributing run scripts: Alessandro Bono (a.bono).


A mingetty run script

(Debian)
  #!/bin/sh
  exec mingetty tty5
The runit package does not care about utmp records for getties. You should choose a getty that handles its own utmp and wtmp records. Debian's mingetty does create his own utmp record.

A sshd run script

(Debian woody)
  #!/bin/sh
  exec 2>&1
  exec sshd -D -e
This service needs a log service to be set up.

The sshd program is version OpenSSH_2.9p2.


A klogd run script

(Debian woody)
  #!/bin/sh
  exec /sbin/klogd -n

An expireproctitle run script

  #!/bin/sh
  echo -n .
  exec sleep 300

A dhcpd run script

(Debian woody)
  #!/bin/sh
  exec 2>&1
  exec dhcpd-2.2.x -f -d -cf ./config eth0
This service needs a log service to be set up.

A dhclient run script

(Debian woody)
  #!/bin/sh
  exec dhclient -e -d -cf ./config -lf ./leases -pf ./pid eth1

A gdm run script

(Debian woody)
  #!/bin/sh
  exec gdm -nodaemon

A statd run script

(Debian woody)
  #!/bin/sh
  exec 2>&1
  NEED_LOCKD=yes
  if test -f /proc/ksyms; then
    # We need to be conservative and run lockd,
    # unless we can prove that it isn't required.
    grep -q lockdctl /proc/ksyms || NEED_LOCKD=no
  fi
  if [ "$NEED_LOCKD" = yes ]; then
    /sbin/rpc.lockd
  fi
  exec rpc.statd -F -d
This service needs a log service to be set up.

A mountd run script

(Debian woody)
  #!/bin/sh
  svwaitup /service/statd
  RPCNFSDCOUNT=8  # Number of servers to be started up by default
  RPCMOUNTDOPTS=-F
  exportfs -r
  rpc.nfsd -- $RPCNFSDCOUNT
  rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
    RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"
  exec rpc.mountd $RPCMOUNTDOPTS

A squid run script

(Debian woody)
  #!/bin/sh
  exec squid -f ./config -sN

A cups run script

(Debian woody, a.bono)
  #!/bin/sh
  exec 2>&1
  exec /usr/sbin/cupsd -f

A pure-ftpd run script

(Debian woody, a.bono)
  #!/bin/sh
  exec 2>&1
  exec /usr/sbin/pure-ftpd -a 50 -E -l pam -u 100


Gerrit Pape <pape@smarden.org>
$Id$