219 lines
6.8 KiB
HTML
219 lines
6.8 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of DH_INSTALLSYSTEMD</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>DH_INSTALLSYSTEMD</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"> </A>
|
||
<H2>NAME</H2>
|
||
|
||
dh_installsystemd - install systemd unit files
|
||
<A NAME="lbAC"> </A>
|
||
<H2>SYNOPSIS</H2>
|
||
|
||
|
||
|
||
<B>dh_installsystemd</B> [<I>debhelper options</I>] [<B>--restart-after-upgrade</B>] [<B>--no-stop-on-upgrade</B>] [<B>--no-enable</B>] [<B>--no-start</B>] [<B>--name=</B><I>name</I>] [<I>unit file</I> ...]
|
||
<A NAME="lbAD"> </A>
|
||
<H2>DESCRIPTION</H2>
|
||
|
||
|
||
|
||
<B>dh_installsystemd</B> is a debhelper program that is responsible for
|
||
installing package maintainer supplied systemd unit files.
|
||
<P>
|
||
|
||
It also finds the service files installed by a package and generates
|
||
<I>preinst</I>, <I>postinst</I>, and <I>prerm</I> code blocks for enabling,
|
||
disabling, starting, stopping, and restarting the corresponding
|
||
systemd services, when the package is installed, updated, or
|
||
removed. These snippets are added to the maintainer scripts by
|
||
<B><A HREF="/cgi-bin/man/man2html?1+dh_installdeb">dh_installdeb</A></B>(1).
|
||
<P>
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?1+deb-systemd-helper">deb-systemd-helper</A></B>(1) is used to enable and disable systemd units,
|
||
thus 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>
|
||
|
||
<B>dh_installsystemd</B> operates on all unit files installed by a
|
||
package. For only generating blocks for specific unit files, pass them
|
||
as arguments, <TT>"dh_installsystemd quota.service"</TT>. Specific unit files
|
||
can be excluded from processing using the <B>-X</B> common <B><A HREF="/cgi-bin/man/man2html?1+debhelper">debhelper</A></B>(1)
|
||
option.
|
||
<A NAME="lbAE"> </A>
|
||
<H2>FILES</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">debian/<I>package</I>.mount, debian/<I>package</I>.path, debian/<I>package</I>@.path, debian/<I>package</I>.service, debian/<I>package</I>@.service, debian/<I>package</I>.socket, debian/<I>package</I>@.socket, debian/<I>package</I>.target, debian/<I>package</I>@.target, debian/<I>package</I>.timer, debian/<I>package</I>@.timer<DD>
|
||
|
||
|
||
If any of those files exists, they are installed into
|
||
<I>lib/systemd/system/</I> in the package build directory.
|
||
<DT id="2">debian/<I>package</I>.tmpfile<DD>
|
||
|
||
|
||
Only used in compat 12 or earlier. In compat 13+, this file is
|
||
handled by <B><A HREF="/cgi-bin/man/man2html?1+dh_installtmpfiles">dh_installtmpfiles</A></B>(1) instead.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
If this exists, it is installed into <I>usr/lib/tmpfiles.d/</I> in the
|
||
package build directory. Note that the <TT>"tmpfiles.d"</TT> mechanism is
|
||
currently only used by systemd.
|
||
</DL>
|
||
<A NAME="lbAF"> </A>
|
||
<H2>OPTIONS</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="3"><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. Please remember to also use <B>--no-start</B> if the service
|
||
should not be started.
|
||
<DT id="4"><B>--name=</B><I>name</I><DD>
|
||
|
||
|
||
This option controls several things.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
It changes the name that <B>dh_installsystemd</B> uses when it looks for
|
||
maintainer provided systemd unit files as listed in the ``<FONT SIZE="-1">FILES''</FONT>
|
||
section. As an example, <B>dh_installsystemd --name foo</B> will look for
|
||
<I>debian/package.</I>foo<I>.service</I> instead of
|
||
<I>debian/package.service</I>). These unit files are installed as <I>name.unit-extension</I> (in the example, it would be installed as
|
||
<I></I>foo<I>.service</I>).
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Furthermore, if no unit files are passed explicitly as command line
|
||
arguments, <B>dh_installsystemd</B> will only act on unit files called
|
||
<I>name</I> (rather than all unit files found in the package).
|
||
<DT id="5"><B>--restart-after-upgrade</B><DD>
|
||
|
||
|
||
Do not stop the unit file until after the package upgrade has been completed.
|
||
This is the default behaviour in compat 10.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
In earlier compat levels the default was to stop the unit file in the
|
||
<I>prerm</I>, and start it again in the <I>postinst</I>.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This can be useful for daemons that should not have a possibly long
|
||
downtime during upgrade. But you should make sure that the daemon will not
|
||
get confused by the package being upgraded while it's running before using
|
||
this option.
|
||
<DT id="6"><B>--no-restart-after-upgrade</B><DD>
|
||
|
||
|
||
Undo a previous <B>--restart-after-upgrade</B> (or the default of compat
|
||
10). If no other options are given, this will cause the service to be
|
||
stopped in the <I>prerm</I> script and started again in the <I>postinst</I>
|
||
script.
|
||
<DT id="7"><B>-r</B>, <B>--no-stop-on-upgrade</B>, <B>--no-restart-on-upgrade</B><DD>
|
||
|
||
|
||
Do not stop service on upgrade.
|
||
<DT id="8"><B>--no-start</B><DD>
|
||
|
||
|
||
Do not start the unit file after upgrades and after initial installation (the
|
||
latter is only relevant for services without a corresponding init script).
|
||
|
||
|
||
<P>
|
||
|
||
|
||
<B>Note</B> that this option does not affect whether the services are
|
||
enabled. Please remember to also use <B>--no-enable</B> if the services
|
||
should not be enabled.
|
||
<DT id="9"><B>unit file</B> ...<DD>
|
||
|
||
|
||
Only process and generate maintscripts for the installed unit files
|
||
with the (base)name <I>unit file</I>.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Note: <B>dh_installsystemd</B> will still install unit files from
|
||
<I>debian/</I> but it will not generate any maintscripts for them unless
|
||
they are explicitly listed in <B>unit file</B> ...
|
||
</DL>
|
||
<A NAME="lbAG"> </A>
|
||
<H2>NOTES</H2>
|
||
|
||
|
||
|
||
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.
|
||
<A NAME="lbAH"> </A>
|
||
<H2>SEE ALSO</H2>
|
||
|
||
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?7+debhelper">debhelper</A></B>(7), <B><A HREF="/cgi-bin/man/man2html?1+dh_installinit">dh_installinit</A></B>(1), <B><A HREF="/cgi-bin/man/man2html?1+deb-systemd-helper">deb-systemd-helper</A></B>(1)
|
||
<A NAME="lbAI"> </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"> </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:10 GMT, March 31, 2021
|
||
</BODY>
|
||
</HTML>
|