summaryrefslogtreecommitdiffstats
path: root/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/health_check.sh
blob: 544358c1af4d85578e8f9806ebf4b43150d247dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -x

startODL_status=$(ps -e | grep startODL | wc -l)
waiting_bundles=$(/opt/opendaylight/current/bin/client bundle:list | grep Waiting | wc -l)
run_level=$(/opt/opendaylight/current/bin/client system:start-level)

  if [ "$run_level" == "Level 100" ] && [ "$startODL_status" -lt "1" ] && [ "$waiting_bundles" -lt "1" ]
  then
    echo APPC is healthy.
  else
    echo APPC is not healthy.
    exit 1
  fi

exit 0