.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" 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 .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "DH_INSTALLINIT 1" .TH DH_INSTALLINIT 1 "2017-01-25" "10.2.5" "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_installinit \- install service init files into package build directories .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdh_installinit\fR [\fIdebhelperĀ options\fR] [\fB\-\-name=\fR\fIname\fR] [\fB\-n\fR] [\fB\-R\fR] [\fB\-r\fR] [\fB\-d\fR] [\fB\-\-\fRĀ \fIparams\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBdh_installinit\fR is a debhelper program that is responsible for installing init scripts with associated defaults files, as well as upstart job files, and systemd service files into package build directories. .PP It also automatically generates the \fIpostinst\fR and \fIpostrm\fR and \fIprerm\fR commands needed to set up the symlinks in \fI/etc/rc*.d/\fR to start and stop the init scripts. .SH "FILES" .IX Header "FILES" .IP "debian/\fIpackage\fR.init" 4 .IX Item "debian/package.init" If this exists, it is installed into etc/init.d/\fIpackage\fR in the package build directory. .IP "debian/\fIpackage\fR.default" 4 .IX Item "debian/package.default" If this exists, it is installed into etc/default/\fIpackage\fR in the package build directory. .IP "debian/\fIpackage\fR.upstart" 4 .IX Item "debian/package.upstart" If this exists, it is installed into etc/init/\fIpackage\fR.conf in the package build directory. .IP "debian/\fIpackage\fR.service" 4 .IX Item "debian/package.service" If this exists, it is installed into lib/systemd/system/\fIpackage\fR.service in the package build directory. Only used in compat levels 10 and below. .IP "debian/\fIpackage\fR.tmpfile" 4 .IX Item "debian/package.tmpfile" If this exists, it is installed into usr/lib/tmpfiles.d/\fIpackage\fR.conf in the package build directory. (The tmpfiles.d mechanism is currently only used by systemd.) Only used in compat levels 10 and below. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-n\fR, \fB\-\-no\-scripts\fR" 4 .IX Item "-n, --no-scripts" Do not modify \fIpostinst\fR/\fIpostrm\fR/\fIprerm\fR scripts. .IP "\fB\-o\fR, \fB\-\-only\-scripts\fR" 4 .IX Item "-o, --only-scripts" Only modify \fIpostinst\fR/\fIpostrm\fR/\fIprerm\fR scripts, do not actually install any init script, default files, upstart job or systemd service file. May be useful if the file is shipped and/or installed by upstream in a way that doesn't make it easy to let \fBdh_installinit\fR find it. .Sp \&\fBCaveat\fR: This will bypass all the regular checks and \&\fIunconditionally\fR modify the scripts. You will almost certainly want to use this with \fB\-p\fR to limit, which packages are affected by the call. Example: .Sp .Vb 3 \& override_dh_installinit: \& dh_installinit \-pfoo \-\-only\-scripts \& dh_installinit \-\-remaining .Ve .IP "\fB\-R\fR, \fB\-\-restart\-after\-upgrade\fR" 4 .IX Item "-R, --restart-after-upgrade" Do not stop the init script until after the package upgrade has been completed. This is the default behaviour in compat 10. .Sp In early compat levels, the default was to stop the script in the \&\fIprerm\fR, and starts 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 init script on upgrade. .IP "\fB\-\-no\-start\fR" 4 .IX Item "--no-start" Do not start the init script on install or upgrade, or stop it on removal. Only call \fBupdate\-rc.d\fR. Useful for rcS scripts. .IP "\fB\-d\fR, \fB\-\-remove\-d\fR" 4 .IX Item "-d, --remove-d" Remove trailing \fBd\fR from the name of the package, and use the result for the filename the upstart job file is installed as in \fIetc/init/\fR , and for the filename the init script is installed as in etc/init.d and the default file is installed as in \fIetc/default/\fR. This may be useful for daemons with names ending in \fBd\fR. (Note: this takes precedence over the \fB\-\-init\-script\fR parameter described below.) .IP "\fB\-u\fR\fIparams\fR \fB\-\-update\-rcd\-params=\fR\fIparams\fR" 4 .IX Item "-uparams --update-rcd-params=params" .PD 0 .IP "\fB\-\-\fR \fIparams\fR" 4 .IX Item "-- params" .PD Pass \fIparams\fR to \fIupdate\-rc.d\fR\|(8). If not specified, \fBdefaults\fR will be passed to \fIupdate\-rc.d\fR\|(8). .IP "\fB\-\-name=\fR\fIname\fR" 4 .IX Item "--name=name" Install the init script (and default file) as well as upstart job file using the filename \fIname\fR instead of the default filename, which is the package name. When this parameter is used, \fBdh_installinit\fR looks for and installs files named \fIdebian/package.name.init\fR, \&\fIdebian/package.name.default\fR and \fIdebian/package.name.upstart\fR instead of the usual \fIdebian/package.init\fR, \fIdebian/package.default\fR and \&\fIdebian/package.upstart\fR. .IP "\fB\-\-init\-script=\fR\fIscriptname\fR" 4 .IX Item "--init-script=scriptname" Use \fIscriptname\fR as the filename the init script is installed as in \&\fIetc/init.d/\fR (and also use it as the filename for the defaults file, if it is installed). If you use this parameter, \fBdh_installinit\fR will look to see if a file in the \fIdebian/\fR directory exists that looks like \&\fIpackage.scriptname\fR and if so will install it as the init script in preference to the files it normally installs. .Sp This parameter is deprecated, use the \fB\-\-name\fR parameter instead. This parameter is incompatible with the use of upstart jobs. .IP "\fB\-\-error\-handler=\fR\fIfunction\fR" 4 .IX Item "--error-handler=function" Call the named shell \fIfunction\fR if running the init script fails. The function should be provided in the \fIprerm\fR and \fIpostinst\fR scripts, before the \&\fB#DEBHELPER#\fR token. .SH "NOTES" .IX Header "NOTES" Note that this command is not idempotent. \fIdh_prep\fR\|(1) should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIdebhelper\fR\|(7) .PP This program is a part of debhelper. .SH "AUTHORS" .IX Header "AUTHORS" Joey Hess .PP Steve Langasek .PP Michael Stapelberg