This commit is contained in:
Cyberes 2024-03-30 21:27:07 -06:00
parent 2c014863db
commit 7c8dbd9099
1 changed files with 4 additions and 4 deletions

View File

@ -420,7 +420,7 @@ fi
# Check critical string # Check critical string
BODY_CONTAINS="" BODY_CONTAINS=""
if [ -n "$CRIT_STRING" ]; then if [ -n "$CRIT_STRING" ]; then
BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE "$HEADERS" "$RESOLVE" "$TIMEOUT" "$URL") BODY=$(curl -s $FOLLOW_REDIRECTS $INSECURE "$HEADERS" $RESOLVE $TIMEOUT "$URL")
# shellcheck disable=SC2076 # shellcheck disable=SC2076
if ! [[ $BODY =~ "$CRIT_STRING" ]]; then if ! [[ $BODY =~ "$CRIT_STRING" ]]; then
if $SANITIZE_HTML; then if $SANITIZE_HTML; then
@ -441,5 +441,5 @@ else
perfdata_str="| $perfdata" perfdata_str="| $perfdata"
fi fi
echo "OK - response time was $RESPONSE_TIME seconds, code $HTTP_CODE.${BODY_CONTAINS}-> $URL $perfdata_str" echo "OK - response time was $RESPONSE_TIME seconds, code $HTTP_CODE${BODY_CONTAINS}. $perfdata_str"
exit 0 exit 0