diff --git a/run.sh b/run.sh index 7f279ce6..114d1fed 100755 --- a/run.sh +++ b/run.sh @@ -7,23 +7,24 @@ source /opt/idssys/nodemgmt/settings.conf source /opt/idssys/nodemgmt/defaults.inc -if [ "$1" != "service" ] && [ "$1" != "status" ] && [ "$1" != "status-check" ]; then - echo "" - echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}" - echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}" - echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}" - for srvc in "${NODE_SERVICES[@]}" - do - if [ "${NM_SERVICES[${srvc}]}" = "" ]; then NM_SERVICES[${srvc}]="${srvc}"; fi - echo -en "${NM_SERVICES[${srvc}]} " - if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then - echo -e "${idsCL[Green]}Running${idsCL[Default]}" - else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" - fi - done - echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}" - echo "" - +if [ "$1" != "service" ] && [ "$1" != "status-check" ]; then + if [ "$1" != "status" ]; then + echo "" + echo -e "${idsCL[Yellow]} NodeMgmt - Galera/NGINX Node Management${idsCL[Default]} ${idsCL[DarkGray]}(ver-${VERS})${idsCL[Default]}" + echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}" + echo -e "Node hostname: ${idsST[Bold]}${idsCL[LightCyan]}${NODE_HOSTNAME}${idsCL[Default]}${idsST[Reset]}" + for srvc in "${NODE_SERVICES[@]}" + do + if [ "${NM_SERVICES[${srvc}]}" = "" ]; then NM_SERVICES[${srvc}]="${srvc}"; fi + echo -en "${NM_SERVICES[${srvc}]} " + if [ $(pgrep ${srvc} | wc -l) -gt "0" ]; then + echo -e "${idsCL[Green]}Running${idsCL[Default]}" + else echo -e "${idsCL[Red]}Not Running${idsCL[Default]}" + fi + done + echo -e "${idsCL[Yellow]}-------------------------------------------------------------${idsCL[Default]}" + echo "" + fi if [ "$1" != "" ]; then echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}" echo ""