2022-01-02 11:52:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2022-01-03 16:21:52 +00:00
|
|
|
vip="$1"
|
|
|
|
port="$2"
|
|
|
|
|
2022-01-02 11:52:37 +00:00
|
|
|
errorExit() {
|
|
|
|
echo "*** $*" 1>&2
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2022-01-03 16:21:52 +00:00
|
|
|
curl --silent --max-time 2 --insecure https://localhost:"$port"/healthz -o /dev/null || errorExit "Error GET https://localhost:$port/healthz"
|
|
|
|
if ip addr | grep -q "$vip"; then
|
|
|
|
curl --silent --max-time 2 --insecure "https://$vip:$port/healthz" -o /dev/null || errorExit "Error GET https://$vip:$port/healthz"
|
2022-01-02 11:52:37 +00:00
|
|
|
fi
|