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