From a25ec2e08dc8baeb05ef95bd86ffc45b3d870aae Mon Sep 17 00:00:00 2001 From: Cyberes Date: Thu, 23 Nov 2023 21:48:45 -0700 Subject: [PATCH] check_curl: shellcheck u dummy --- check_curl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/check_curl.sh b/check_curl.sh index d91384f..fa586ed 100755 --- a/check_curl.sh +++ b/check_curl.sh @@ -411,7 +411,8 @@ fi BODY_CONTAINS=" " if [ -n "$CRIT_STRING" ]; then BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE $HEADERS $RESOLVE $TIMEOUT $URL) - if ! [[ $BODY =~ $CRIT_STRING ]]; then + # shellcheck disable=SC2076 + if ! [[ $BODY =~ "$CRIT_STRING" ]]; then # if ! echo "$BODY" | grep -q "$CRIT_STRING"; then echo "CRITICAL - response body does not contain '$CRIT_STRING': $BODY" exit 2