Merge "Add schemaIngest properties resource to aai-gizmo"
[oom.git] / kubernetes / appc / resources / config / appc / opt / onap / appc / bin / health_check.sh
1 #!/bin/bash -x
2
3 startODL_status=$(ps -e | grep startODL | wc -l)
4 waiting_bundles=$(/opt/opendaylight/current/bin/client bundle:list | grep Waiting | wc -l)
5 run_level=$(/opt/opendaylight/current/bin/client system:start-level)
6
7   if [ "$run_level" == "Level 100" ] && [ "$startODL_status" -lt "1" ] && [ "$waiting_bundles" -lt "1" ]
8   then
9     echo APPC is healthy.
10   else
11     echo APPC is not healthy.
12     exit 1
13   fi
14
15 exit 0