[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.
Makes sense I guess. 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. > There are minor variants on these in the nosh-systemd-services > package, which runs the nosh daemontools-compatibility scanner under > systemd in a similar (but not quite the same, since nosh has a > separate socket-activated service manager and a choice of service > scanners) manner. For more documentation, install the nosh-guide > package and read /usr/local/share/doc/nosh/svscan-startup.html . > > For the packages themselves, go to > http://homepage.ntlworld.com./jonathan.deboynepollard/Softwares/nosh.html > . I notice that I've missed off a link to the nosh-systemd-services > package. I'll try to fix that as soon as I have the right computer > accessible. It's not hard to guess the URL from the other hyperlinks > there, though. nosh-systemd-services_1.6_amd64.deb is the package > name. > > Do systemd units the systemd way, of course. My unit files here are > in /etc because they are my local administrator modifications. Yours > will have to be in /usr/lib . In Debian that would be /lib/systemd/system/ 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. > jdebp /etc/systemd/system %cat svscan.path > [Unit] > Description=Daemontools service monitor > > [Path] > DirectoryNotEmpty=/service/ > Unit=svscan.service Is that a typo? Is that really a /service top-level directory? Shouldn't that rather be something like /etc/service? > [Install] > WantedBy=multi-user.target > jdebp /etc/systemd/system %cat svscan.service > [Unit] > Description=Daemontools service scanner > > [Service] > ExecStart=/usr/bin/svscan /service/ > Restart=always > > [Install] > I guess we have enough options now how this can be addressed in daemontools. A quite literal translation of the inittab entry or a deeper integration into systemd utilizing the journal and mechanisms like .path units. [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