aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb')
-rw-r--r--catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb11
1 files changed, 11 insertions, 0 deletions
diff --git a/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb
new file mode 100644
index 0000000000..5239e9bdef
--- /dev/null
+++ b/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/ready-probe.sh.erb
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+health_Check_http_code=$(curl --max-time 5 -o /dev/null -w '%{http_code}' http://localhost:8080/sdc2/rest/healthCheck)
+if [[ "$health_Check_http_code" -eq 500 ]]; then
+ exit 200
+else
+ exit $health_Check_http_code
+fi
+
+
+