Skip to content

Commit

Permalink
updated check_haproxy_syntax.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Feb 14, 2025
1 parent 3e94cb6 commit b7202cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions check_haproxy_syntax.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ test_haproxy_conf(){
local cfg="$1"
local str
str="$(printf "%-${maxwidth}s " "$cfg:")"
#if haproxy -v | grep -Eqi '^HA-?Proxy version (1|2\.[01])'; then
if [ "$(bc <<< "$haproxy_version < 2.2")" = 1 ]; then
if grep -q '^[[:space:]]*http-check send meth' "$cfg"; then
if grep -q '^[[:space:]]*http-check send meth' "$cfg"; then
#if haproxy -v | grep -Eqi '^HA-?Proxy version (1|2\.[01])'; then
if [ "$(bc <<< "$haproxy_version < 2.2")" = 1 ]; then
echo "$str Skipping due to old HAProxy version not supporting 'http-check send meth'"
return
fi
Expand Down

0 comments on commit b7202cc

Please sign in to comment.