21 | | All scripts should include the tag `#DEBHELPER#` as the penultimate line of the script, should explicitly exit with status 0 at the end of the script, and should handle all possible arguments (see below). When creating new maintainer scripts, you should use the examples in `/usr/share/debhelper/dh_make/debian/`. In there, you'll fine `postinst.ex`, `preinst.ex`, etc. |
| 21 | All scripts should include the tag `#DEBHELPER#` as the penultimate line^(1)^ of the script, should explicitly exit with status 0 at the end of the script, and should handle all possible arguments (see below). When creating new maintainer scripts, you should use the examples in `/usr/share/debhelper/dh_make/debian/`. In there, you'll fine `postinst.ex`, `preinst.ex`, etc. |
| 22 | |
| 23 | ^(1)^ There may be times when you want `#DEBHELPER#` at the top of the script. Basically, `#DEBHELPER#` will be replaced by all the other stuff added by debhelper scripts. So if you supply a _packagename_.init script, `dh_installinit` will add some code to restart the daemon, and that code will show up where the `#DEBHELPER#` tag is. This does require a bit of thought. If you're using ConfigPackageDev and diverting a file, and then relying on the file already being diverted in the postinst, then the tag needs to go at the top. |