Skip to content

Instantly share code, notes, and snippets.

@th-schwarz
Last active September 29, 2022 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save th-schwarz/cd20775593bb145f310f64ed27919a9e to your computer and use it in GitHub Desktop.
Save th-schwarz/cd20775593bb145f310f64ed27919a9e to your computer and use it in GitHub Desktop.
Script to check, if there is an update for mailcow-dockerized. In this case, an email will be sent. It's intended to use in a cron jobs.
#!/bin/bash
set -o nounset
set -o errexit
cd /opt/mailcow-dockerized && ./update.sh --check > /dev/null
exit_code=$?
[ $exit_code -eq 0 ] && echo -e "Subject:MAILCOW: Update available \n\n Update your mailcow instance please!\n" | sendmail root
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment