Search code examples
installationpackagedpkg

Output a custom message during a dpkg package installation


I am trying to install create a simple .deb dpkg package.

I have seen multiple packages where, during installation, they output custom messages like Reboot after installation! or Clearing caches or (in the case of iOS) Thanks to [developer]!.

I can't seem to find any way to replicate this myself during installation of my package.

How do I output a custom message to the terminal while dpkg is installing my package?


Solution

  • You can do this by providing a postinst script to the package.

    See section 7.6 What is a Debian preinst, postinst, prerm, and postrm script?