• Home
  • Blog
  • runit and supervised services on RHEL/CentOS 5

runit and supervised services on RHEL/CentOS 5

Vincent Danen

April 07, 2010

I'm sure I've mentioned this before, but I maintain a repository of packages for Red Hat Enterprise Linux 5 (arguably these could/should be in EPEL but I've not had time to get into the Fedora side of things as of yet... someone will beat me with a wet noodle, no doubt). It's a very small set of packages so I don't feel too awful about it.

Anyways, one of my favourite features in Annvix was being able to run the entire system out of runit (Annvix used runit in place of SysVinit). This gave us nicely supervised services using runit (much like DJB's daemontools). Feeling crappy with the first day of a head cold, I spent some time today over lunch to get runit working with RHEL5. I had to re-tool the package since I don't want it to replace SysVinit, but run under init and just supervise services (like sshd, exim, etc. -- call me weird, but runit/daemontools makes a fantastic watchdog and with sshd running from tcpsvd, I get some nice ACLs to use as well).

At any rate, runit now installs and works properly. Sorry to anyone who wanted to use it (I've been meaning to do this for the last year, ever since I switched all of my servers over to CentOS). The runit package also comes with a bunch of run scripts; I've not tested them all yet so if you do end up using it and have issues, let me know. I did have to fix a few minor things in a few of them.

At any rate, I've chkconfig'd off a few services and have them running supervised now:

# srv --list|grep -v '-'

service                   status   pid      started             
crond                     up       2737     04/07/2010 02:16:32 PM
crond/log                 up       2735     04/07/2010 02:16:32 PM
exim                      up       2747     04/07/2010 02:16:32 PM
exim/log                  up       2746     04/07/2010 02:16:32 PM
mdadm                     up       2738     04/07/2010 02:16:32 PM
mdadm/log                 up       2736     04/07/2010 02:16:32 PM
ntpd                      up       2733     04/07/2010 02:16:32 PM
ntpd/log                  up       2731     04/07/2010 02:16:32 PM
smartd                    up       2739     04/07/2010 02:16:32 PM
smartd/log                up       2734     04/07/2010 02:16:32 PM
sshd                      up       2732     04/07/2010 02:16:32 PM
sshd/log                  up       2730     04/07/2010 02:16:32 PM

One thing knocked off my TODO list. Replaced it with going to bed early tonight.

Leave a Comment

Comments use MarkDown. Need help? MarkDown Cheatsheet