dh_installinit − install upstart jobs or init scripts into package build directories
dh_installinit [debhelperoptions] [−−name=name] [−n] [−R] [−r] [−d] [−O] [−−params]
dh_installinit is a debhelper program that is responsible for installing upstart job files or init scripts with
associated defaults files into package build directories, and in the former case providing compatibility
handling for non-upstart systems.
It also automatically generates the postinst and postrm and prerm commands needed to set up the symlinks
in /etc/rc*.d/ and to start and stop the init scripts.
If this exists, it is installed into etc/init/package.conf in the package build directory.
Otherwise, if this exists, it is installed into etc/init.d/package in the package build directory.
If this exists, it is installed into etc/default/package in the package build directory.
Do not modify postinst/postrm/prerm scripts.
Only modify postinst/postrm/prerm scripts, do not actually install any init script, default files, or
upstart job. May be useful if the init script or upstart job is shipped and/or installed by upstream in a
way that doesn’t make it easy to let dh_installinit find it.
If no upstart job file is installed in the target directory when dh_installinit −−onlyscripts is called, this
program will assume that an init script is being installed and not provide the compatibility symlinks or
Do not stop the init script until after the package upgrade has been completed. This is different than
the default behavior, which stops the script in the prerm, and starts it again in the postinst.
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