Skip to content

Commit 124dd30

Browse files
authored
corrected algo for "healthcheck" when HTTPS is used (#27)
Signed-off-by: Alexander Piskun <[email protected]>
1 parent 1a958cb commit 124dd30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

healthcheck.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@
33
if [ "$BIND_ADDRESS" != "*" ]; then
44
nc -z "$BIND_ADDRESS" "$HAPROXY_PORT" || exit 1
55
else
6-
nc -z localhost "$HAPROXY_PORT" || exit 1
6+
if ! nc -z "127.0.0.1" "$HAPROXY_PORT" && ! nc -z "::1" "$HAPROXY_PORT"; then
7+
exit 1
8+
fi
79
fi

0 commit comments

Comments
 (0)