13 lines
484 B
Bash
Executable File
13 lines
484 B
Bash
Executable File
APISERVER_VIP=192.168.4.100
|
|
APISERVER_DEST_PORT=6443
|
|
|
|
errorExit() {
|
|
echo "* * * $*" 1>&2
|
|
exit 1
|
|
}
|
|
|
|
curl --silent --max-time 2 --insecure https://localhost:${APISERVER_DEST_PORT}/ -o /dev/null || errorExit "Error GET https://localhost:${APISERVER_DEST_PORT}/"
|
|
if ip addr | grep -q ${APISERVER_VIP}; then
|
|
curl --silent --max-time 2 --insecure https://${APISERVER_VIP}:${APISERVER_DEST_PORT}/ -o /dev/null || errorExit "Error GET https://${APISERVER_VIP}:${APISERVER_DEST_PORT}/"
|
|
fi
|