aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/dist/sdc-onboard-backend-docker/artifacts/chef-repo/cookbooks/sdc-onboard-backend/templates/default/ready-probe.sh.erb
blob: bea3c34488a0964e6114e52ad3dfc92ddb763391 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash
health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "Accept: application/json" "<%= @protocol %>://127.0.0.1:<%= @port %>/onboarding-api/v1.0/healthcheck")
if [[ "$health_check_http_code" -eq 200 ]]; then
  exit 0
else
  echo "Health check http status: $health_check_http_code"
  exit 1
fi