(debian-policy.info)Running initscripts
9.3.3.2 Running initscripts
...........................
The program ‘invoke-rc.d’ is provided to make it easier for package
maintainers to properly invoke an initscript, obeying runlevel and other
locally-defined constraints that might limit a package’s right to start,
stop and otherwise manage services. This program may be used by
maintainers in their packages’ scripts.
The package maintainer scripts must use ‘invoke-rc.d’ to invoke the
‘/etc/init.d/*’ initscripts or equivalent, instead of calling them
directly.
By default, ‘invoke-rc.d’ will pass any action requests (start, stop,
reload, restart…) to the ‘/etc/init.d’ script, filtering out requests to
start or restart a service out of its intended runlevels.
Most packages will simply use:
invoke-rc.d package action
in their ‘postinst’ and ‘prerm’ scripts.
A package should register its initscript services using ‘update-rc.d’
before it tries to invoke them using ‘invoke-rc.d’. Invocation of
unregistered services may fail.
For more information about using ‘invoke-rc.d’, please consult its man
page, invoke-rc.d(8).
It is easiest for packages not to call ‘invoke-rc.d’ directly, but
instead use debhelper programs that add the required ‘invoke-rc.d’ calls
automatically. See ‘dh_installinit’, ‘dh_installsystemd’, etc.
automatically generated by info2www version 1.2.2.9