blob: 4e582272410d55d4a4d59d15bbb4ef0ff3fdb656 (
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}' -X GET --header "USER_ID: cs0008" --header "Accept: application/json" "http://127.0.0.1:<%= @ssl_port %>/onboarding-api/v1.0/healthcheck")
<% else %>
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")
<% end -%>
if [[ "$health_Check_http_code" -eq 200 ]]; then
exit 0
else
exit $health_Check_http_code
fi
|