60148e0d1684ccc9b9529efdf0bbb5887aabb5f9
[sdc.git] /
1 #!/bin/bash
2 <% if node[:disableHttp] -%>
3 health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "USER_ID: cs0008" --header "Accept: application/json" "https://127.0.0.1:<%= @ssl_port %>/onboarding-api/v1.0/healthcheck")
4 <% else %>
5 health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "USER_ID: cs0008" --header "Accept: application/json" "http://127.0.0.1:<%= @onboard_port %>/onboarding-api/v1.0/healthcheck")
6 <% end -%>
7 if [[ "$health_Check_http_code" -eq 200 ]]; then
8    exit 0
9 else
10    exit $health_Check_http_code
11 fi