Upstart and daemontools on Ubuntu Edgy Eft

UPDATE: For starting daemontools with upstart on "Feisty Fawn" please see this

A few days ago, a new Ubuntu version "Edgy Eft" was released. I decided to upgrade my desktop from Dapper Drake.

Upgrade went smothly (except small issues with python version in postinst script in serpento package). After that, i decided to switch to the new init system upstart. Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running. Old rc?.d scripts can still work with it. So everything looked ok after reboot, though later i found that svscanboot daemon from daemontools package is no longer running (and all services, which supposed to be run under it, too). The reason of this was the way it's configured in Ubuntu. Not sure how it is done in Debian now, but IIRC it was done via rc?.d scripts. In Ubuntu, installer added this line to inittab:

SV:123456:respawn:/command/svscanboot

The problem is that such thing does not work with upstart. Jobs for Upstart can be configured in /etc/event.d. I Added small script into this directory to start svscanboot daemon at boot time:

# svscanboot

start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5

stop on shutdown

respawn /command/svscanboot

After this it is only required to start it:

$ sudo initctl start svscanboot
svscanboot (start) running, process 5595 active

24 responses to «Upstart and daemontools on Ubuntu Edgy Eft»

 Denes Szabo commented, on July 24, 2007 at 10:58 a.m.:

THX! It helped me too!

 Kohsuke Kawaguchi commented, on September 19, 2007 at 2:27 a.m.:

On Feisty, I needed to change the last line of that script to:

respawn
exec /command/svscanboot

Otherwise I get the following error in /var/log/syslog

init: /etc/event.d/svscanboot:10: Unknown stanza

 ATAG commented, on October 12, 2007 at 4:04 p.m.:

My working script looks like this (gutsy)

# svscanboot

start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on shutdown

respawn
exec /command/svscanboot

Post a comment