1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-28 19:47:23 +01:00

backups: email the administrator when there's a problem

Refactor by moving the email-the-admin code out of the status checks and into a new separate tool.

This is why I suppressed non-error output of the backups last commit - so it doesn't send a daily email.
This commit is contained in:
Joshua Tauberer
2016-01-02 17:00:51 -05:00
parent 89a46089ee
commit 5033042b8c
4 changed files with 68 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
# This script is run daily (at 3am each night).
# Take a backup.
management/backup.py
management/backup.py | management/email_administrator.py "Backup Status"
# Run status checks and email the administrator if anything changed.
management/status_checks.py --show-changes --smtp
management/status_checks.py --show-changes | management/email_administrator.py "Status Checks Change Notice"