@cryptotaxi247 / netdata-1 / commits / 8ed890404

fix sendmail unrecognized option F error (#10631)

Ilya Mashchenko committed Feb 15, 2021 at 15:42 UTC 8ed89040458074d8c293b636f09dc6549b2898ce
1 file changed +2 -2
health/notifications/alarm-notify.sh.in
+2 -2
@@ -855,7 +855,7 @@ send_email() {
855 fi
856
857 [ -n "${sender_email}" ] && opts+=(-f "${sender_email}")
858 - [ -n "${sender_name}" ] && opts+=(-F "${sender_name}")
858 + [ -n "${sender_name}" ] && sendmail --help 2>&1 | grep -q "\-F " && opts+=(-F "${sender_name}")
859
860 if [ "${debug}" = "1" ]; then
861 echo >&2 "--- BEGIN sendmail command ---"
@@ -2054,7 +2054,7 @@ send_dynatrace() {
2054 local dynatrace_url="${DYNATRACE_SERVER}/e/${DYNATRACE_SPACE}/api/v1/events"
2055 local description="NetData Notification for: ${host} ${chart}.${name} is ${status}"
2056 local payload=""
2057 -
2057 +
2058 payload=$(cat <<EOF
2059 {
2060 "title": "NetData Alarm from ${host}",