man-pages/man1/dh_systemd_enable.1.html
2021-03-31 01:06:50 +01:00

166 lines
5.4 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of DH_SYSTEMD_ENABLE</TITLE>
</HEAD><BODY>
<H1>DH_SYSTEMD_ENABLE</H1>
Section: Debhelper (1)<BR>Updated: 2020-03-27<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
dh_systemd_enable - enable/disable systemd unit files
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>dh_systemd_enable</B> [<I>debhelper options</I>] [<B>--no-enable</B>] [<B>--name=</B><I>name</I>] [<I>unit file</I> ...]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>dh_systemd_enable</B> is a debhelper program that is responsible for enabling
and disabling systemd unit files.
<P>
In the simple case, it finds all unit files installed by a package (e.g.
bacula-fd.service) and enables them. It is not necessary that the machine
actually runs systemd during package installation time, enabling happens on all
machines in order to be able to switch from sysvinit to systemd and back.
<P>
In the complex case, you can call <B>dh_systemd_enable</B> and <B>dh_systemd_start</B>
manually (by overwriting the debian/rules targets) and specify flags per unit
file. An example is colord, which ships colord.service, a dbus-activated
service without an [Install] section. This service file cannot be enabled or
disabled (a state called ``static'' by systemd) because it has no
[Install] section. Therefore, running dh_systemd_enable does not make sense.
<P>
For only generating blocks for specific service files, you need to pass them as
arguments, e.g. <B>dh_systemd_enable quota.service</B> and <B>dh_systemd_enable
--name=quotarpc quotarpc.service</B>.
<A NAME="lbAE">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<DT id="1">debian/<I>package</I>.service, debian/<I>package</I>@.service<DD>
If this exists, it is installed into lib/systemd/system/<I>package</I>.service (or
lib/systemd/system/<I>package</I>@.service) in the package build directory.
<DT id="2">debian/<I>package</I>.tmpfile<DD>
If this exists, it is installed into usr/lib/tmpfiles.d/<I>package</I>.conf in the
package build directory. (The tmpfiles.d mechanism is currently only used
by systemd.)
<DT id="3">debian/<I>package</I>.target, debian/<I>package</I>@.target<DD>
If this exists, it is installed into lib/systemd/system/<I>package</I>.target (or
lib/systemd/system/<I>package</I>@.target) in the package build directory.
<DT id="4">debian/<I>package</I>.socket, debian/<I>package</I>@.socket<DD>
If this exists, it is installed into lib/systemd/system/<I>package</I>.socket (or
lib/systemd/system/<I>package</I>@.socket) in the package build directory.
<DT id="5">debian/<I>package</I>.mount<DD>
If this exists, it is installed into lib/systemd/system/<I>package</I>.mount
in the package build directory.
<DT id="6">debian/<I>package</I>.path, debian/<I>package</I>@.path<DD>
If this exists, it is installed into lib/systemd/system/<I>package</I>.path (or
lib/systemd/system/<I>package</I>@.path) in the package build directory.
<DT id="7">debian/<I>package</I>.timer, debian/<I>package</I>@.timer<DD>
If this exists, it is installed into lib/systemd/system/<I>package</I>.timer (or
lib/systemd/system/<I>package</I>@.timer) in the package build directory.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="8"><B>--no-enable</B><DD>
Disable the service(s) on purge, but do not enable them on install.
<P>
<B>Note</B> that this option does not affect whether the services are
started. That is controlled by <B><A HREF="/cgi-bin/man/man2html?1+dh_systemd_start">dh_systemd_start</A></B>(1) (using e.g. its
<B>--no-start</B> option).
<DT id="9"><B>--name=</B><I>name</I><DD>
Install the service file as <I>name.service</I> instead of the default filename,
which is the <I>package.service</I>. When this parameter is used,
<B>dh_systemd_enable</B> looks for and installs files named
<I>debian/package.name.service</I> instead of the usual <I>debian/package.service</I>.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>NOTES</H2>
Note that this command is not idempotent. <B><A HREF="/cgi-bin/man/man2html?1+dh_prep">dh_prep</A></B>(1) should be called
between invocations of this command (with the same arguments). Otherwise, it
may cause multiple instances of the same text to be added to maintainer
scripts.
<P>
Note that <B>dh_systemd_enable</B> should be run before <B>dh_installinit</B>.
The default sequence in <B>dh</B> does the right thing, this note is only relevant
when you are calling <B>dh_systemd_enable</B> manually.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+dh_systemd_start">dh_systemd_start</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?7+debhelper">debhelper</A></B>(7)
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
<A HREF="mailto:pkg-systemd-maintainers@lists.alioth.debian.org">pkg-systemd-maintainers@lists.alioth.debian.org</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="10"><A HREF="#lbAB">NAME</A><DD>
<DT id="11"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="12"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="13"><A HREF="#lbAE">FILES</A><DD>
<DT id="14"><A HREF="#lbAF">OPTIONS</A><DD>
<DT id="15"><A HREF="#lbAG">NOTES</A><DD>
<DT id="16"><A HREF="#lbAH">SEE ALSO</A><DD>
<DT id="17"><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:11 GMT, March 31, 2021
</BODY>
</HTML>