.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "DH_INSTALLSYSTEMD 1" .TH DH_INSTALLSYSTEMD 1 "2021-03-06" "13.3.4" "Debhelper" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dh_installsystemd \- install systemd unit files .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdh_installsystemd\fR [\fIdebhelper options\fR] [\fB\-\-restart\-after\-upgrade\fR] [\fB\-\-no\-stop\-on\-upgrade\fR] [\fB\-\-no\-enable\fR] [\fB\-\-no\-start\fR] [\fB\-\-name=\fR\fIname\fR] [\fIunit file\fR ...] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdh_installsystemd\fR is a debhelper program that is responsible for installing package maintainer supplied systemd unit files. .PP It also finds the service files installed by a package and generates \&\fIpreinst\fR, \fIpostinst\fR, and \fIprerm\fR 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 \&\fBdh_installdeb\fR\|(1). .PP \&\fBdeb\-systemd\-helper\fR\|(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. .PP \&\fBdh_installsystemd\fR operates on all unit files installed by a package. For only generating blocks for specific unit files, pass them as arguments, \f(CW\*(C`dh_installsystemd quota.service\*(C'\fR. Specific unit files can be excluded from processing using the \fB\-X\fR common \fBdebhelper\fR\|(1) option. .SH "FILES" .IX Header "FILES" .IP "debian/\fIpackage\fR.mount, debian/\fIpackage\fR.path, debian/\fIpackage\fR@.path, debian/\fIpackage\fR.service, debian/\fIpackage\fR@.service, debian/\fIpackage\fR.socket, debian/\fIpackage\fR@.socket, debian/\fIpackage\fR.target, debian/\fIpackage\fR@.target, debian/\fIpackage\fR.timer, debian/\fIpackage\fR@.timer" 4 .IX Item "debian/package.mount, debian/package.path, debian/package@.path, debian/package.service, debian/package@.service, debian/package.socket, debian/package@.socket, debian/package.target, debian/package@.target, debian/package.timer, debian/package@.timer" If any of those files exists, they are installed into \&\fIlib/systemd/system/\fR in the package build directory. .IP "debian/\fIpackage\fR.tmpfile" 4 .IX Item "debian/package.tmpfile" Only used in compat 12 or earlier. In compat 13+, this file is handled by \fBdh_installtmpfiles\fR\|(1) instead. .Sp If this exists, it is installed into \fIusr/lib/tmpfiles.d/\fR in the package build directory. Note that the \f(CW\*(C`tmpfiles.d\*(C'\fR mechanism is currently only used by systemd. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-\-no\-enable\fR" 4 .IX Item "--no-enable" Disable the service(s) on purge, but do not enable them on install. .Sp \&\fBNote\fR that this option does not affect whether the services are started. Please remember to also use \fB\-\-no\-start\fR if the service should not be started. .IP "\fB\-\-name=\fR\fIname\fR" 4 .IX Item "--name=name" This option controls several things. .Sp It changes the name that \fBdh_installsystemd\fR uses when it looks for maintainer provided systemd unit files as listed in the \*(L"\s-1FILES\*(R"\s0 section. As an example, \fBdh_installsystemd \-\-name foo\fR will look for \&\fI\fIdebian/package.\fI\f(BI\f(BIfoo\f(BI\fI\fI.service\fI\fR instead of \&\fI\fIdebian/package.service\fI\fR). These unit files are installed as \fI\fIname.unit\-extension\fI\fR (in the example, it would be installed as \&\fI\f(BI\f(BIfoo\f(BI\fI\fI.service\fI\fR). .Sp Furthermore, if no unit files are passed explicitly as command line arguments, \fBdh_installsystemd\fR will only act on unit files called \&\fIname\fR (rather than all unit files found in the package). .IP "\fB\-\-restart\-after\-upgrade\fR" 4 .IX Item "--restart-after-upgrade" Do not stop the unit file until after the package upgrade has been completed. This is the default behaviour in compat 10. .Sp In earlier compat levels the default was to stop the unit file in the \&\fIprerm\fR, and start it again in the \fIpostinst\fR. .Sp 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. .IP "\fB\-\-no\-restart\-after\-upgrade\fR" 4 .IX Item "--no-restart-after-upgrade" Undo a previous \fB\-\-restart\-after\-upgrade\fR (or the default of compat 10). If no other options are given, this will cause the service to be stopped in the \fIprerm\fR script and started again in the \fIpostinst\fR script. .IP "\fB\-r\fR, \fB\-\-no\-stop\-on\-upgrade\fR, \fB\-\-no\-restart\-on\-upgrade\fR" 4 .IX Item "-r, --no-stop-on-upgrade, --no-restart-on-upgrade" Do not stop service on upgrade. This has the side-effect of not restarting the service as a part of the upgrade. .Sp If you want to restart the service with minimal downtime, please use \&\fB\-\-restart\-after\-upgrade\fR (default in compat 10 or later). If you want the service to be restarted but be stopped during the upgrade, then please use \fB\-\-no\-restart\-after\-upgrade\fR (note the \*(L"after-upgrade\*(R"). .Sp Note that the \fB\-\-no\-restart\-on\-upgrade\fR alias is deprecated and will be removed in compat 14. This is to avoid confusion with the \&\fB\-\-no\-restart\-after\-upgrade\fR option. .IP "\fB\-\-no\-start\fR" 4 .IX Item "--no-start" Do not start the unit file after upgrades and after initial installation (the latter is only relevant for services without a corresponding init script). .Sp \&\fBNote\fR that this option does not affect whether the services are enabled. Please remember to also use \fB\-\-no\-enable\fR if the services should not be enabled. .IP "\fBunit file\fR ..." 4 .IX Item "unit file ..." Only process and generate maintscripts for the installed unit files with the (base)name \fIunit file\fR. .Sp Note: \fBdh_installsystemd\fR will still install unit files from \&\fIdebian/\fR but it will not generate any maintscripts for them unless they are explicitly listed in \fBunit file\fR ... .SH "NOTES" .IX Header "NOTES" This command is not idempotent. \fBdh_prep\fR\|(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. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdebhelper\fR\|(7), \fBdh_installinit\fR\|(1), \fBdeb\-systemd\-helper\fR\|(1) .SH "AUTHORS" .IX Header "AUTHORS" pkg\-systemd\-maintainers@lists.alioth.debian.org