Browse Source
fix(alert): correct mailgun email variable
pull/3639/head
Daniel Gibbs
3 years ago
No known key found for this signature in database
GPG Key ID: 2EBB36015C6D78E2
1 changed files with
5 additions and
5 deletions
-
lgsm/functions/alert_mailgun.sh
|
|
@ -13,7 +13,7 @@ else |
|
|
|
mailgunapiurl="https://api.mailgun.net" |
|
|
|
fi |
|
|
|
|
|
|
|
fn_print_dots "Sending Email alert: Mailgun: ${email}" |
|
|
|
fn_print_dots "Sending Email alert: Mailgun: ${mailgunemail}" |
|
|
|
|
|
|
|
mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ |
|
|
|
-F from="LinuxGSM <${mailgunemailfrom}>" \ |
|
|
@ -24,9 +24,9 @@ mailgunsend=$(curl --connect-timeout 10 -s --user "api:${mailguntoken}" \ |
|
|
|
-F text="$(cat "${alertlog}")" "${mailgunapiurl}/v3/${mailgundomain}/messages") |
|
|
|
|
|
|
|
if [ -z "${mailgunsend}" ]; then |
|
|
|
fn_print_fail_nl "Sending Email alert: Mailgun: ${email}" |
|
|
|
fn_script_log_fatal "Sending Email alert: Mailgun: ${email}" |
|
|
|
fn_print_fail_nl "Sending Email alert: Mailgun: ${mailgunemail}" |
|
|
|
fn_script_log_fatal "Sending Email alert: Mailgun: ${mailgunemail}" |
|
|
|
else |
|
|
|
fn_print_ok_nl "Sending Email alert: Mailgun: ${email}" |
|
|
|
fn_script_log_pass "Sending Email alert: Mailgun: ${email}" |
|
|
|
fn_print_ok_nl "Sending Email alert: Mailgun: ${mailgunemail}" |
|
|
|
fn_script_log_pass "Sending Email alert: Mailgun: ${mailgunemail}" |
|
|
|
fi |
|
|
|