1DH_INSTALLSYSTEMD(1)               Debhelper              DH_INSTALLSYSTEMD(1)
2
3
4

NAME

6       dh_installsystemd - install systemd unit files
7

SYNOPSIS

9       dh_installsystemd [debhelper options] [--restart-after-upgrade]
10       [--no-stop-on-upgrade] [--no-enable] [--no-start] [--name=name]
11       [unit file ...]
12

DESCRIPTION

14       dh_installsystemd is a debhelper program that is responsible for
15       installing package maintainer supplied systemd unit files.
16
17       It also finds the service files installed by a package and generates
18       preinst, postinst, and prerm code blocks for enabling, disabling,
19       starting, stopping, and restarting the corresponding systemd services,
20       when the package is installed, updated, or removed. These snippets are
21       added to the maintainer scripts by dh_installdeb(1).
22
23       deb-systemd-helper(1) is used to enable and disable systemd units, thus
24       it is not necessary that the machine actually runs systemd during
25       package installation time, enabling happens on all machines in order to
26       be able to switch from sysvinit to systemd and back.
27
28       dh_installsystemd operates on all unit files installed by a package.
29       For only generating blocks for specific unit files, pass them as
30       arguments, "dh_installsystemd quota.service". Specific unit files can
31       be excluded from processing using the -X common debhelper(1) option.
32

FILES

34       debian/package.mount, debian/package.path, debian/package@.path,
35       debian/package.service, debian/package@.service, debian/package.socket,
36       debian/package@.socket, debian/package.target, debian/package@.target,
37       debian/package.timer, debian/package@.timer
38           If any of those files exists, they are installed into
39           lib/systemd/system/ in the package build directory.
40
41       debian/package.tmpfile
42           If this exists, it is installed into usr/lib/tmpfiles.d/ in the
43           package build directory. Note that the "tmpfiles.d" mechanism is
44           currently only used by systemd.
45

OPTIONS

47       --no-enable
48           Disable the service(s) on purge, but do not enable them on install.
49
50           Note that this option does not affect whether the services are
51           started.  Please remember to also use --no-start if the service
52           should not be started.
53
54       --name=name
55           This option controls several things.
56
57           It changes the name that dh_installsystemd uses when it looks for
58           maintainer provided systemd unit files as listed in the "FILES"
59           section.  As an example, dh_installsystemd --name foo will look for
60           debian/package.foo.service instead of debian/package.service).
61           These unit files are installed as name.unit-extension (in the
62           example, it would be installed as foo.service).
63
64           Furthermore, if no unit files are passed explicitly as command line
65           arguments, dh_installsystemd will only act on unit files called
66           name (rather than all unit files found in the package).
67
68       --restart-after-upgrade
69           Do not stop the unit file until after the package upgrade has been
70           completed.  This is the default behaviour in compat 10.
71
72           In earlier compat levels the default was to stop the unit file in
73           the prerm, and start it again in the postinst.
74
75           This can be useful for daemons that should not have a possibly long
76           downtime during upgrade. But you should make sure that the daemon
77           will not get confused by the package being upgraded while it's
78           running before using this option.
79
80       --no-restart-after-upgrade
81           Undo a previous --restart-after-upgrade (or the default of compat
82           10).  If no other options are given, this will cause the service to
83           be stopped in the prerm script and started again in the postinst
84           script.
85
86       -r, --no-stop-on-upgrade, --no-restart-on-upgrade
87           Do not stop service on upgrade.
88
89       --no-start
90           Do not start the unit file after upgrades and after initial
91           installation (the latter is only relevant for services without a
92           corresponding init script).
93
94           Note that this option does not affect whether the services are
95           enabled.  Please remember to also use --no-enable if the services
96           should not be enabled.
97
98       unit file ...
99           Only process and generate maintscripts for the installed unit files
100           with the (base)name unit file.
101
102           Note: dh_installsystemd will still install unit files from debian/
103           but it will not generate any maintscripts for them unless they are
104           explicitly listed in unit file ...
105

NOTES

107       This command is not idempotent. dh_prep(1) should be called between
108       invocations of this command (with the same arguments). Otherwise, it
109       may cause multiple instances of the same text to be added to maintainer
110       scripts.
111

SEE ALSO

113       debhelper(7), dh_installinit(1), deb-systemd-helper(1)
114

AUTHORS

116       pkg-systemd-maintainers@lists.alioth.debian.org
117
118
119
12012.7.3                            2020-07-27              DH_INSTALLSYSTEMD(1)
Impressum