3

I have a lot of application packages that I help maintain. Many of the applications run as systemd services. To install a package as a service it is very easy to place a service file in the debian directory of the package source. When the package is installed, this debian/service file is automatically installed as /lib/systemd/system/[package-name].service. This has been working excellently for us for years.

Recently we found the need to start using path units alongside the service units in our packages. It seems like it would be pretty straight forward to just add a file named path to the debian directory. However, I have built and installed a package several times now and while the service unit file gets installed, the path unit file does not. I have also tried naming both files with the package name (eg package.service and package.path) without success, meaning that the service file gets installed but the path file does not.

What am I doing wrong? How do I properly package the application so that the path unit gets installed with the service unit?


As a workaround, I currently create the /lib/systemd/system/[package-name].path path/file in the debian directory and add a line to the install file to get the file into the proper place:

debian/lib/systemd/system/[package-name].path lib/systemd/system/
SunSparc
  • 137
  • 6
  • 1
    This bug report seems to indicate that path unit support was added: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768609 – SunSparc Feb 20 '17 at 19:44
  • Looks like that bug report shows that it is not yet in stable, so this should probably show up in future versions. – SunSparc Feb 20 '17 at 19:57

0 Answers0