From 5f92331612e6cf77befea9e7cbd457939a80a024 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 25 Mar 2023 11:32:09 -0500 Subject: [PATCH] Update mm-scripts.sh --- mm-scripts.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm-scripts.sh b/mm-scripts.sh index 1fa7c91..2928604 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -458,9 +458,10 @@ MMSTATUS(){ echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" else - if ([ "${MM_SERVICE_PORTS[${srvc}]}" != "" ] && [ lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t >/dev/null ]) || [ "${MM_SERVICE_PORTS[${srvc}]}" == "" ]; then + checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t) + if ([ "${MM_SERVICE_PORTS[${srvc}]}" != "" ] && [ "${checkport}" != "" ]) || [ "${MM_SERVICE_PORTS[${srvc}]}" == "" ]; then echo -e "${idsCL[Green]}Running${idsCL[Default]}" - elif [ ! lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t >/dev/null ]; then + elif [ "${checkport}" == "" ]; then echo -e "${idsCL[LightMagenta]}Service Running, Web Port Not Accesible${idsCL[Default]}" fi