Update do-backup for userdirs. Remove ''s around from= for mailx.
This commit is contained in:
parent
2e2e666797
commit
25394932fb
4 changed files with 41 additions and 10 deletions
|
|
@ -55,7 +55,7 @@ if (( "$ERR" == 0 )); then
|
|||
# The size of the log file determines if it gets emailed.
|
||||
(( $(stat --printf="%s" "$LOGSDIR/$LOGFILE") > MIN_LOGFILE_SIZE )) && {
|
||||
if [[ -n "${EMAIL_TO[*]}" ]]; then
|
||||
mailx "${MAILX_ARGS[@]}" -S "from='$EMAIL_FROM'" -s "Mirroring report" "${EMAIL_TO[@]}" <<-EOF 2>/dev/null || \
|
||||
mailx "${MAILX_ARGS[@]}" -S "from=$EMAIL_FROM" -s "Mirroring report" "${EMAIL_TO[@]}" <<-EOF 2>/dev/null || \
|
||||
{ printf "%s: %s\\n" "${0##*/}" "mailx command failed" >&2; RET=1; }
|
||||
Exit code: $ERR
|
||||
Logfile: $LOGSDIR/$LOGFILE.gz
|
||||
|
|
@ -71,7 +71,7 @@ else
|
|||
# Mirroring failed, tell the admin.
|
||||
[[ -x "/opt/bin/pushover" ]] && CONFIG_FILE="mirroring" /opt/bin/pushover -T "Mirroring" -p '-1' -m "Mirroring failed"
|
||||
if [[ -n "${EMAIL_TO[*]}" ]]; then
|
||||
mailx "${MAILX_ARGS[@]}" -S "from='$EMAIL_FROM'" -s "Mirroring failure" "${EMAIL_TO[@]}" <<-EOF 2>/dev/null || \
|
||||
mailx "${MAILX_ARGS[@]}" -S "from=$EMAIL_FROM" -s "Mirroring failure" "${EMAIL_TO[@]}" <<-EOF 2>/dev/null || \
|
||||
{ printf "%s: %s\\n" "${0##*/}" "mailx command failed" >&2; RET=1; }
|
||||
Exit code: $ERR
|
||||
Logfile: $LOGSDIR/$LOGFILE.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue