mailcow-dockerized-docs/docs/u_e-update-hooks.md
Alexander Holzapfel 32dcb9a0b6
Add pre_ and post_update_hook doc (#284)
* Add pre_ and post_update_hook doc

* Add hint for hook to update page

* Update u_e-update-hooks.md

Co-authored-by: André Peters <andre.peters@debinux.de>
Co-authored-by: Patrik Kernstock <patrik@kernstock.net>
2021-07-30 23:20:53 +01:00

684 B

It is possible to add pre- and post-update-hooks to the update.sh script that upgrades your whole mailcow installation.

To do so, just add the corresponding bash script into your mailcows root directory:

  • pre_update_hook.sh for commands that should run before the update
  • post_uddate_hook.sh for commands that should run after the update is completed

Keep in mind that pre_update_hook.sh runs every time you call update.sh and post_update_hook.sh will only run if the update was successful and the script doesn't have to be re-run.

The scripts will be run by bash, an interpreter (e.g. #!/bin/bash) as well as an execute permission flag ("+x") are not required.