watch tls files
[sdc.git] / catalog-be / src / main / docker / backend / chef-repo / cookbooks / sdc-catalog-be / templates / default / ready-probe.sh.erb
1 #!/bin/sh
2 health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' <%= @protocol %>://127.0.0.1:<%= @port %>/sdc2/rest/healthCheck)
3
4 if [ "$health_check_http_code" -eq 200 ]; then
5   exit 0
6 else
7   echo "Health check http status: $health_check_http_code"
8   exit 1
9 fi