Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 11, 2020 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/d7c6d1629c33727c07e5b806b96981b3 to your computer and use it in GitHub Desktop.
Save velotiotech/d7c6d1629c33727c07e5b806b96981b3 to your computer and use it in GitHub Desktop.
#!/bin/sh
errorExit() {
echo "*** $*" 1>&2
exit 1
}
curl --silent --max-time 2 --insecure https://localhost:6443/ -o /dev/null || errorExit "Error GET https://localhost:6443/"
if ip addr | grep -q <VIRTUAL-IP>; then
curl --silent --max-time 2 --insecure https://<VIRTUAL-IP>:6443/ -o /dev/null || errorExit "Error GET https://<VIRTUAL-IP>:6443/"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment