diff --git a/mm-scripts.sh b/mm-scripts.sh index 2928604..cc3eeb4 100755 --- a/mm-scripts.sh +++ b/mm-scripts.sh @@ -458,7 +458,7 @@ MMSTATUS(){ echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" else - checkport=$(lsof -Pi :${MM_SERVICE_PORTS[${srvc}]} -sTCP:LISTEN -t) + [ "${MM_SERVICE_PORTS[${srvc}]}" != "" ] && 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 [ "${checkport}" == "" ]; then