diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2018-12-13 16:29:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-13 16:29:19 +0100 |
commit | eef866e721486ebb21b7650f6c73b9ffa16f8383 (patch) | |
tree | e6193e025b2cfcdc35256828cd1992d358c825f2 /health | |
parent | 6b05a213029d0097a98e26b6c2aa4ff635f37182 (diff) |
Fix to #4968, custom recipients were not working properly (#4978)
##### Summary
Fixes #4968
The custom recipient variable substitution wasn't working properly
##### Component Name
health notifications
##### Additional Information
Diffstat (limited to 'health')
-rwxr-xr-x | health/notifications/alarm-notify.sh.in | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index 6567c0ec83..7afa7ceea8 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -592,11 +592,10 @@ for method_name in ${method_names} ; do # don't send a notification for this role [ "${x}" = "silent" -o "${x}" = "disabled" ] && continue - role_recipients_var="role_recipients_${method_name}" - role_recipients=${!role_recipients_var} + role_recipients="role_recipients_${method_name}[$x]" default_recipient_var="DEFAULT_RECIPIENT_${method_name^^}" - a="${role_recipients[${x}]}" + a="${!role_recipients}" [ -z "${a}" ] && a="${!default_recipient_var}" for r in ${a//,/ } ; do [ "${r}" != "disabled" ] && filter_recipient_by_criticality ${method_name} "${r}" && arr_var[${r/|*/}]="1" |