diff --git a/inc/status.inc b/inc/status.inc index 1b2bde75..d645a7f2 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -771,7 +771,14 @@ STATUS_NODE(){ if [ ! -f ${NM_TMPFOLDER}/${nip}~${docker}.disable ] && ([ ${SDCHK} == true ] || [ ${SDCHK} == primary ]); then [ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[White]} ${NM_DOCKER_DESC[${docker}]}$spc${idsCL[Default]}: " - if [ ! "$(${NCMD} docker ps -a -q -f name=${docker})" ] || [ "$(${NCMD} docker inspect -f {{.State.Health.Status}} ${docker} 2>/dev/null)" == "unhealthy" ]; then + docker_go=0 + if [ "$(${NCMD} docker inspect -f {{.State.Health.Status}} ${docker} 2>/dev/null)" == "healthy" ]; then + docker_go=1 + elif [ "$(${NCMD} docker inspect -f {{.State.Running}} ${docker})" == "true" ]; then + docker_go=1 + fi + + if [ ${docker_go} -eq 1 ]; then #if [ ! -f ${NM_TMPFOLDER}/${nip}~${docker}.disable ] && ([ "${nip}" = "10.2.1.5" ] || [[ "${nip}" != *"10.2."* ]] || ([[ "${nip}" = *"10.2."* ]] && [ ! -f ${PW_TMPFOLDER}/OFF-vMS-Host1.down ])); then if [ ! -f ${NM_TMPFOLDER}/${nip}~${docker}.disable ]; then