Am 07.07.2014 16:36, schrieb Gerrit Pape: > Hi Michael, thanks for your help. > > On Mon, Jul 07, 2014 at 02:59:05PM +0200, Michael Biebl wrote: >> [CCing the bug report] >> >> Am 07.07.2014 14:39, schrieb Jonathan de Boyne Pollard: >>> I did systemd units for this ages ago. It's better to do this as two >>> units: a "path" unit that watches the service directory and a >>> "service" unit that is started when the service directory is found to >>> be non-empty. > > Hi Jonathan, good to see you're still around. Thanks for your > contribution. > >> And you don't need svscanboot at all, since systemd's >>> journal logs the output of svscan and does it better than >>> readproctitle does. >> >> Ansgar suggested using the journal for that as well [1], which sounds >> reasonable. > > Is this journal an in-memory-log, or does it write to disk?
Depends on the configuration. The default in jessie will be to not log to disk. We might change that in the future though. >> And don't forget to run "systemctl >>> preset svscan.path" as part of your package installation process. >>> (I've heard rumours that "update-rc.d svscan.path defaults" runs >>> "systemctl preset svscan.path" in some testing versions somewhere; but >>> I've not witnessed this myself.) >> >> As Ansgar already mentioned, probably the best way to handle that in >> Debian is to use the dh-systemd helper. >> Unfortuantely the daemontools package doesn't use debhelper, which >> complicates that a bit it. > > To me, that's not unfortunate. To me, debhelper complicates things. It > can't be that difficult to enable a service, configure it to be enabled > by default, and vice-versa. The problem here is, that you can't rely on systemd being installed, as it is not mandatory. Therefore we re-implemented the relevant bits in the init-system-helpers package. > To see what snippets debhelper puts into maintainer scripts, can you > point me to an example package in Debian that installs simple systemd > services, Michael? I search for files containing systemd in the debian > package directory, but with no applicable result. There are many packages which use dh-systemd (basically all packages depending on init-system-helpers. You can have a look at those. Also, Ansgar already more or less answered that question at [1]: > As far as I know, this still misses the maintainer script logic that is > needed to start the service on installation and stop it again when the > package is removed. > > There is a debhelper addon to add them, but the daemontools doesn't use > debhelper so they have to be added manually. The snippets can be found > in autoscripts/* in the init-system-helpers source package (it also > needs a runtime dependency on init-system-helpers). You can copy the relevant bits to your maintainer scripts, but it has the unfortunate effect that updates of dh-systemd will not automatically be applied to your package and you'll have to do that manually. [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752075#60 -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature