1 SDNC_DBHOST_POD=$(/consul/config/bin/kubectl -n namespace-placeholder get pod | grep -o "sdnc-dbhost-[^[:space:]]*")
2 if [ -n "$SDNC_DBHOST_POD" ]; then
3 if /consul/config/bin/kubectl -n namespace-placeholder exec -it $SDNC_DBHOST_POD -- ./healthcheck.sh |grep -i "mysqld is alive"; then
4 echo Success. SDNC DBHost is running. 2>&1
7 echo Failed. SDNC DBHost is not running. 2>&1
11 echo Failed. SDNC DBHost is offline. 2>&1