I am trying to build a debian package with systemd scripts and I don't really understand the best way to do it.
My first question is, should I use the --with=systemd
option (and override dh_systemd_enable
and dh_systemd_start
) or is using dh_installinit
with the --name
option enough? Because both seem to do the same thing.
You definitely need --with=systemd
in your dh
invocation.
As for which combination of overrides you need, it depends.
It sounds like you just need systemd units included, so you don't need to override anything.
Since your question doesn't have much context, I will list some of the use cases for when to override each systemd debhelpder.
When to use override_dh_systemd_enable:
Manual page for dh_systemd_enable
When to use override_dh_systemd_start:
Manual page for dh_systemd_start
When to use override_dh_installinit:
dh_systemd_start
and dh_systemd_enable
section above. There are also many things that involve upstart, which is not relevant to this question. Please see the man page, linked below.Manual page for dh_installinit
Also note all these overrides go into your debian control file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.