From 2060174be587cbb38e579519e6bb8f314284cdc3 Mon Sep 17 00:00:00 2001 From: Yigid BALABAN Date: Sat, 5 Oct 2024 16:27:09 +0300 Subject: [PATCH] all i needed was -L to make it work --- login-mailer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login-mailer.sh b/login-mailer.sh index 67f264c..c93682b 100755 --- a/login-mailer.sh +++ b/login-mailer.sh @@ -39,7 +39,7 @@ if echo "$NEW_LINES" | grep -q "sshd.*Accepted"; then RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" \ -H "Content-Type: application/json" \ -d "$JSON_PAYLOAD" \ - "$ENDPOINT") + -L "$ENDPOINT") if [[ "$RESPONSE_CODE" -ne 200 ]]; then log_message "Failed to send login alert. Response code: $RESPONSE_CODE"