all i needed was -L to make it work
This commit is contained in:
parent
f06ce051d2
commit
2060174be5
@ -39,7 +39,7 @@ if echo "$NEW_LINES" | grep -q "sshd.*Accepted"; then
|
|||||||
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "$JSON_PAYLOAD" \
|
-d "$JSON_PAYLOAD" \
|
||||||
"$ENDPOINT")
|
-L "$ENDPOINT")
|
||||||
|
|
||||||
if [[ "$RESPONSE_CODE" -ne 200 ]]; then
|
if [[ "$RESPONSE_CODE" -ne 200 ]]; then
|
||||||
log_message "Failed to send login alert. Response code: $RESPONSE_CODE"
|
log_message "Failed to send login alert. Response code: $RESPONSE_CODE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user