mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-25 20:22:33 +01:00
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.
This commit is contained in:
parent
fa2528a083
commit
8f81c85274
@ -661,6 +661,7 @@ EOF
|
||||
let "errors +-1"
|
||||
fi
|
||||
fi
|
||||
if [ ! -z "$reportemail" ]; then
|
||||
if [ -x "$(which mail 2>/dev/null)" ]; then
|
||||
debug "send report to $reportemail"
|
||||
hostname=`hostname`
|
||||
@ -689,8 +690,8 @@ EOF
|
||||
error "Unable to locate mail executable, email report not sent!"
|
||||
let "errors += 1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $actions_run != 0 ]; then
|
||||
info "FINISHED: $actions_run actions run. $fatals fatal. $errors error. $warnings warning."
|
||||
if [ "$halts" != "0" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user