How should the systemd setup in a postinst script look?
I am trying to get rid of the lintian messages of my apache karaf debian
One of the warnings still present, is:
W: karaf: maintainer-script-calls-systemctl postinst:30
The relevant part of the script, is:
case "$1" in
deb-systemd-helper enable karaf.service
systemctl start karaf
echo "Started karaf daemon"
By experimentation I've found that I need both the "systemctl
daemon-reload" and the "systemctl start karaf",
and I don't know how to
replace this with the recommended dh_systemd_enable and
And what should I do about "deb-systemd-helper enable karaf.service"?
Is none of this needed if I change the default rule in the rules file to this?
dh $@ --with systemd
This is from the "Pragmatic Debian Packaging" article: