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           Install the service file as name.service instead of the default
56           filename package.service. When this parameter is used,
57           dh_installsystemd looks for and installs files named
58           debian/package.name.service instead of the usual
59           debian/package.service.  Moreover, maintainer scripts are only
60           generated for units that match the given name.
61
62       --restart-after-upgrade
63           Do not stop the unit file until after the package upgrade has been
64           completed.  This is the default behaviour in compat 10.
65
66           In earlier compat levels the default was to stop the unit file in
67           the prerm, and start it again in the postinst.
68
69           This can be useful for daemons that should not have a possibly long
70           downtime during upgrade. But you should make sure that the daemon
71           will not get confused by the package being upgraded while it's
72           running before using this option.
73
74       --no-restart-after-upgrade
75           Undo a previous --restart-after-upgrade (or the default of compat
76           10).  If no other options are given, this will cause the service to
77           be stopped in the prerm script and started again in the postinst
78           script.
79
80       -r, --no-stop-on-upgrade, --no-restart-on-upgrade
81           Do not stop service on upgrade.
82
83       --no-start
84           Do not start the unit file after upgrades and after initial
85           installation (the latter is only relevant for services without a
86           corresponding init script).
87
88           Note that this option does not affect whether the services are
89           enabled.  Please remember to also use --no-enable if the services
90           should not be enabled.
91

NOTES

93       This command is not idempotent. dh_prep(1) should be called between
94       invocations of this command (with the same arguments). Otherwise, it
95       may cause multiple instances of the same text to be added to maintainer
96       scripts.
97

SEE ALSO

99       debhelper(7), dh_installinit(1), deb-systemd-helper(1)
100

AUTHORS

102       pkg-systemd-maintainers@lists.alioth.debian.org
103
104
105
10611.4                              2018-09-14              DH_INSTALLSYSTEMD(1)
Impressum