66b07873e59c5224bc6f966c3c00048c8e7d5a48
[sdc.git] / sdc-os-chef / sdc-elasticsearch / chef-repo / cookbooks / sdc-elasticsearch / templates / default / ready-probe.sh.erb
1 #!/bin/bash
2
3 health_Check_http_code=$(curl -o /dev/null -w '%{http_code}' http://127.0.0.1:9200/_cluster/health?wait_for_status=yellow&timeout=120s)
4 if [[ "$health_Check_http_code" -eq 200 ]]; then
5    exit 200
6 else
7    exit $health_Check_http_code
8 fi