Using runit with Upstart
When using runit with Upstart in Ubuntu 7.04, you’re going to run in to a couple of problems. The first is that the package doesn’t install cleanly without the presence of /etc/inittab
, which Upstart doesn’t need. You can fix that with a simple:
$ sudo touch /etc/inittab
Now, you need to actually add runit to Upstart. You do this by putting the following in /etc/event.d/runsvdir
:
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/sbin/runsvdir-start
This will cause runsvdir-start
to run during runlevel 2, 3, 4, and 5, stop when the system is going to be shutdown, and respawn if it goes away.
If you are on Ubuntu 6.10, the syntax is a bit different:
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn /usr/sbin/runsvdir-start
Trackbacks
Use the following link to trackback from your own site:
http://blog.hjksolutions.com/articles/trackback/5