Files
learn-devops/ansible/roles/haproxy_static_pods/files/check_apiserver.sh
github-actions[bot] 946cde1ea6 Add pre-commit hook (#8)
* Add pre-commit hook

* Fix progress

* Update hook

---------

Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
2024-05-22 15:05:24 +03:00

12 lines
357 B
Bash
Executable File

#!/bin/sh
errorExit() {
echo "*** $*" 1>&2
exit 1
}
curl --silent --max-time 2 --insecure https://localhost:7443/ -o /dev/null || errorExit "Error GET https://localhost:7443/"
if ip addr | grep -q 10.0.70.85; then
curl --silent --max-time 2 --insecure https://10.0.70.85:7443/ -o /dev/null || errorExit "Error GET https://10.0.70.85:7443/"
fi