check_curl: shellcheck u dummy

This commit is contained in:
Cyberes 2023-11-23 21:48:45 -07:00
parent 5f09df07d9
commit a25ec2e08d
1 changed files with 2 additions and 1 deletions

View File

@ -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