diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2021-02-15 15:42:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 15:42:10 +0300 |
commit | 8ed89040458074d8c293b636f09dc6549b2898ce (patch) | |
tree | 448a63fd0829ea53493d473db5b4fb9f7a0439cc | |
parent | 5571b20dcf76af676f6d1447285f7e3376f117f5 (diff) |
fix sendmail unrecognized option F error (#10631)
-rwxr-xr-x | health/notifications/alarm-notify.sh.in | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index b4127bf6b7..3bf8db5f6d 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -855,7 +855,7 @@ send_email() { fi [ -n "${sender_email}" ] && opts+=(-f "${sender_email}") - [ -n "${sender_name}" ] && opts+=(-F "${sender_name}") + [ -n "${sender_name}" ] && sendmail --help 2>&1 | grep -q "\-F " && opts+=(-F "${sender_name}") if [ "${debug}" = "1" ]; then echo >&2 "--- BEGIN sendmail command ---" @@ -2054,7 +2054,7 @@ send_dynatrace() { local dynatrace_url="${DYNATRACE_SERVER}/e/${DYNATRACE_SPACE}/api/v1/events" local description="NetData Notification for: ${host} ${chart}.${name} is ${status}" local payload="" - + payload=$(cat <<EOF { "title": "NetData Alarm from ${host}", |