aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb
blob: fed19d1aa2d73bd81e5b6d488740ab4945243299 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
<% if node[:disableHttp] -%>
health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' https://127.0.0.1:<%= @ssl_port %>/sdc1/rest/healthCheck)
<% else %>
health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://127.0.0.1:8181/sdc1/rest/healthCheck)
<% end -%>
if [[ "$health_Check_http_code" -eq 200 ]]; then
   exit 0
else
   exit $health_Check_http_code
fi