imeyer/runit-rpm — pull request #2 by ksperling (2011-10-26 06:48:39+00:00)
Title: Improvements for runsvdir under upstart

These are a few tweaks I've made to make shutdown of runsvdir work better when controlled via upstart.

Unfortunately upstart doesn't seem to be able to use any signal other than TERM for stopping a service (but then runsvdir's use of HUP for this is pretty non-standard), and TERM causes runsvdir to stop without stopping the managed services. So I've added a patch to runsvdir with an extra command line option -H to make TERM behave like HUP.

I made some additional tweaks to the upstart job and the spec file -- the usage of rpm in preun was giving me problems when trying to uninstall runit (rpm complained that the package is meant to be uninstalled but wasn't yet during that invocation), so I've based the tests of whether to remove the upstart job simply on whether or not the file is present.

Finally starting/stopping via runlevels seems to work better (for me at least) than 'on shutdown' and IMO makes more sense as start/stop is symmetric this way.

Cheers, Karsten