Skip to content
Snippets Groups Projects
Unverified Commit 8f81c852 authored by micah's avatar micah :speech_balloon:
Browse files

Allow for disabling reports by email.

This diff simply adds one line:

`if [ ! -z "$reportemail" ]; then` and then it indents the if block and adds a
final `fi`.

This check used to be there, without it, its not possible to disable report
mails, which might be something desirable if you are getting alerts through the
prometheus method.
parent fa2528a0
No related branches found
No related tags found
1 merge request!55Add basic prometheus metrics for backup status.
...@@ -661,6 +661,7 @@ EOF ...@@ -661,6 +661,7 @@ EOF
let "errors +-1" let "errors +-1"
fi fi
fi fi
if [ ! -z "$reportemail" ]; then
if [ -x "$(which mail 2>/dev/null)" ]; then if [ -x "$(which mail 2>/dev/null)" ]; then
debug "send report to $reportemail" debug "send report to $reportemail"
hostname=`hostname` hostname=`hostname`
...@@ -690,7 +691,7 @@ EOF ...@@ -690,7 +691,7 @@ EOF
let "errors += 1" let "errors += 1"
fi fi
fi fi
fi
if [ $actions_run != 0 ]; then if [ $actions_run != 0 ]; then
info "FINISHED: $actions_run actions run. $fatals fatal. $errors error. $warnings warning." info "FINISHED: $actions_run actions run. $fatals fatal. $errors error. $warnings warning."
if [ "$halts" != "0" ]; then if [ "$halts" != "0" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment