I need to build a package for a program that should be deployed as a service.
I have added a debian/helloworld.service
and my package is built, installed and works correctly, i have a /lib/systemd/system/helloworld.service
on the target host.
However, users may be able to run several instance of the service, each one with their own config files and i have seen here that i need a template service file in the form helloworld@.service
.
But when i try to build the package using debian/helloworld@.service
, i don't have the templated service file in the package anymore (dpkg -c
shows that there is no helloworld@.service
in the .deb)
Note that i am building a binary package using fakeroot debian/rules binary
.
What is the best way to do that ? Should i use postinst scripts (but https://www.debian.org/doc/manuals/maint-guide/dother.en.html#maintscripts seems to discourage their use) ?
Thank you.