diff --git a/docs/i_u_m_update.md b/docs/i_u_m_update.md index d20b76676..f3be9af67 100644 --- a/docs/i_u_m_update.md +++ b/docs/i_u_m_update.md @@ -66,6 +66,10 @@ docker-compose pull docker-compose up -d ``` +### Hooks + +You can hook into the update mechanism by adding scripts called `pre_commit_hook.sh` and `post_commit_hook.sh` to your mailcows root directory. See [this](./u_e-update-hooks.md) for more details. + ## Footnotes - There is no release cycle regarding updates. diff --git a/docs/u_e-update-hooks.md b/docs/u_e-update-hooks.md new file mode 100644 index 000000000..1d61bbe1c --- /dev/null +++ b/docs/u_e-update-hooks.md @@ -0,0 +1,10 @@ +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. diff --git a/mkdocs.yml b/mkdocs.yml index 27e14debf..518e0872a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,6 @@ -site_name: 'mailcow: dockerized documentation' +site_name: "mailcow: dockerized documentation" site_url: https://mailcow.github.io/mailcow-dockerized-docs/ -copyright: 'Copyright © 2021 AndrĂ© Peters' +copyright: "Copyright © 2021 AndrĂ© Peters" repo_name: mailcow/mailcow-dockerized repo_url: https://github.com/mailcow/mailcow-dockerized edit_uri: ../mailcow-dockerized-docs/edit/master/docs/ @@ -46,7 +46,7 @@ nav: - 'Password hashing': 'model-passwd.md' - 'Sender and receiver model': 'model-sender_rcv.md' - 'General Troubleshooting': - - 'Introduction': debug.md + - 'Introduction': 'debug.md' - 'Logs': 'debug-logs.md' - 'Attach a Container': 'debug-attach_service.md' - 'Reset Passwords (incl. SQL)': 'debug-reset_pw.md' @@ -106,6 +106,7 @@ nav: - 'Autodiscover / Autoconfig': 'u_e-autodiscover_config.md' - 'Redirect HTTP to HTTPS': 'u_e-80_to_443.md' - 'Re-enable TLS 1.0 and TLS 1.1': 'u_e-reeanble-weak-protocols.md' + - "Run scripts before and after updates": "u_e-update-hooks.md" - 'Client Configuration': - 'Overview': 'client.md' - 'Android': 'client/client-android.md' @@ -128,20 +129,20 @@ nav: - 'Roundcube': 'third_party-roundcube.md' - 'SOGo Connector for Thunderbird': 'third_party-thunderbird.md' icon: - logo: 'images/logo.svg' + logo: "images/logo.svg" extra: palette: - primary: 'indigo' - accent: 'orange' + primary: "indigo" + accent: "orange" social: - icon: fontawesome/solid/globe-americas link: https://mailcow.email - icon: fontawesome/brands/github-alt link: https://github.com/mailcow -extra_css: [extra.css] -extra_javascript: [clients.js] +extra_css: [ extra.css ] +extra_javascript: [ clients.js ] plugins: - - search - - redirects: - redirect_maps: - 'u_e-mailpiler-integration.md': 'third_party-mailpiler_integration.md' + - search + - redirects: + redirect_maps: + 'u_e-mailpiler-integration.md': 'third_party-mailpiler_integration.md'