summaryrefslogtreecommitdiffstats
path: root/catalog-fe/sdc-frontend/chef-repo/cookbooks/sdc-catalog-fe/templates/default/ready-probe.sh.erb
blob: 5b772ecb151a8cac0f011c3a61890e943e8a9be8 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/bash
health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' <%= @protocol %>://127.0.0.1:<%= @port %>/sdc1/rest/healthCheck)

if [[ "$health_check_http_code" -eq 200 ]]; then
  exit 0
else
  echo "Health check http status: $health_check_http_code"
  exit 1
fi