Hi, thanks for all the help I already got. On Mon, Jul 07, 2014 at 04:56:24PM +0200, Michael Biebl wrote: > Am 07.07.2014 16:36, schrieb Gerrit Pape: > >> 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.
I'm really not keen to add a dependency to daemontools-run, esp. not to the runit package, just for (un)installing and starting/stopping a service. Why isn't it as simple as installing the unit, and then?: systemd not installed || start service systemd not installed || have service started by default and systemd not installed || stop service systemd not installed || have service not started by default Why do I need a helper for that? Regards, Gerrit. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org