1DH_SYSTEMD_ENABLE(1) Debhelper DH_SYSTEMD_ENABLE(1)
2
3
4
6 dh_systemd_enable - enable/disable systemd unit files
7
9 dh_systemd_enable [debhelper options] [--no-enable] [--name=name]
10 [unit file ...]
11
13 dh_systemd_enable is a debhelper program that is responsible for
14 enabling and disabling systemd unit files.
15
16 In the simple case, it finds all unit files installed by a package
17 (e.g. bacula-fd.service) and enables them. It is not necessary that
18 the machine actually runs systemd during package installation time,
19 enabling happens on all machines in order to be able to switch from
20 sysvinit to systemd and back.
21
22 In the complex case, you can call dh_systemd_enable and
23 dh_systemd_start manually (by overwriting the debian/rules targets) and
24 specify flags per unit file. An example is colord, which ships
25 colord.service, a dbus-activated service without an [Install] section.
26 This service file cannot be enabled or disabled (a state called
27 "static" by systemd) because it has no [Install] section. Therefore,
28 running dh_systemd_enable does not make sense.
29
30 For only generating blocks for specific service files, you need to pass
31 them as arguments, e.g. dh_systemd_enable quota.service and
32 dh_systemd_enable --name=quotarpc quotarpc.service.
33
35 debian/package.service, debian/package@.service
36 If this exists, it is installed into
37 lib/systemd/system/package.service (or
38 lib/systemd/system/package@.service) in the package build
39 directory.
40
41 debian/package.tmpfile
42 If this exists, it is installed into
43 usr/lib/tmpfiles.d/package.conf in the package build directory.
44
45 debian/package.target, debian/package@.target
46 If this exists, it is installed into
47 lib/systemd/system/package.target (or
48 lib/systemd/system/package@.target) in the package build directory.
49
50 debian/package.socket, debian/package@.socket
51 If this exists, it is installed into
52 lib/systemd/system/package.socket (or
53 lib/systemd/system/package@.socket) in the package build directory.
54
55 debian/package.mount
56 If this exists, it is installed into
57 lib/systemd/system/package.mount in the package build directory.
58
59 debian/package.path, debian/package@.path
60 If this exists, it is installed into
61 lib/systemd/system/package.path (or
62 lib/systemd/system/package@.path) in the package build directory.
63
64 debian/package.timer, debian/package@.timer
65 If this exists, it is installed into
66 lib/systemd/system/package.timer (or
67 lib/systemd/system/package@.timer) in the package build directory.
68
70 --no-enable
71 Disable the service(s) on purge, but do not enable them on install.
72
73 Note that this option does not affect whether the services are
74 started. That is controlled by dh_systemd_start(1) (using e.g. its
75 --no-start option).
76
77 --name=name
78 Install the service file as name.service instead of the default
79 filename, which is the package.service. When this parameter is
80 used, dh_systemd_enable looks for and installs files named
81 debian/package.name.service instead of the usual
82 debian/package.service.
83
85 Note that this command is not idempotent. dh_prep(1) should be called
86 between invocations of this command (with the same arguments).
87 Otherwise, it may cause multiple instances of the same text to be added
88 to maintainer scripts.
89
90 Note that dh_systemd_enable should be run before dh_installinit. The
91 default sequence in dh does the right thing, this note is only relevant
92 when you are calling dh_systemd_enable manually.
93
95 dh_systemd_start(1), debhelper(7)
96
98 pkg-systemd-maintainers@lists.alioth.debian.org
99
100
101
10213.11.6 2023-09-02 DH_SYSTEMD_ENABLE(1)