diff --git a/inc/status.inc b/inc/status.inc index 67fadb42..be1574cb 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -214,6 +214,13 @@ STATUS(){ [ "${NTYPE}" != "OFW" ] && srvctst=(`${NCMD} "systemctl is-active ${srvcstotest}"`) sr=0 for srvc in "${!srvcs}"; do + if [ "${ST_ACTION}" != "report" ]; then + c=0; cw=${PRI_CW}; spc='' + spc1=${cw}-${#NM_SERVICE_DESC[${srvc}]} + until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + else + spc=' ' + fi tmp=${NM_SINGLESRVR_SERVICES[${NTYPE}]} if [[ ${tmp[@]} =~ ${srvc} ]]; then if [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP[${NTYPE}]}* ]]; then @@ -229,14 +236,7 @@ STATUS(){ [ "${srvc}" == "keepalived" ] && ([ "${nip}" == "10.2.1.2" ] || [ "${nip}" == "10.2.1.51" ]) && NOGOCHK=false if [ ${SSCHK} == true ]; then - if [ "${ST_ACTION}" != "check" ]; then - if [ "${ST_ACTION}" != "report" ]; then - c=0; cw=${PRI_CW}; spc=''; spc1=${cw}-${#NM_SERVICE_DESC[${srvc}]}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done - else - spc=' ' - fi - echo -en "${idsCL[White]} ${NM_SERVICE_DESC[${srvc}]}${spc}${idsCL[Default]}: " - fi + [ "${ST_ACTION}" != "check" ] && echo -en "${idsCL[White]} ${NM_SERVICE_DESC[${srvc}]}${spc}${idsCL[Default]}: " if [ "${NTYPE}" != "OFW" ]; then srvctest=${srvctst[$sr]} if [ "${srvctest}" != "active" ] && [ "${srvc}" == "mysql" ]; then