diff --git a/inc/status.inc b/inc/status.inc index e8bb3dd6..9fd4c2fc 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -36,14 +36,18 @@ STATUS(){ # if [ "${STATUS_ACTION}" == "report" ] || [ "${STATUS_ACTION}" == "repl" ] || [ "${STATUS_ACTION}" == "check" ] || [ "${STATUS_ACTION}" == "" ]; then if [ "${STATUS_ACTION}" == "repl" ] || ([ "${STATUS_ACTION}" == "" ] && [ "${ntss}" == "" ]) || ([ "${STATUS_ACTION}" == "report" ] && [ ${REPLRUN} -eq 1 ]) || ([ "${ntss}" != "" ] && [ "${NM_REPL_CHECK[${ntss}]}" != "" ] && ([ "${STATUS_ACTION}" == "" ] || [ "${STATUS_ACTION}" == "repl" ])); then if [ "${STATUS_ACTION}" != "check" ]; then - echo -en "${idsCL[LightCyan]}Setting up replication checks ... ${idsCL[Default]}" + MSG="Setting up replication checks" + c=0; cw=100; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -en "${idsCL[LightCyan]}${MSG}${spc}:" fi for NTYPE in "${ntypesel[@]}"; do REPLSTART ${NTYPE} & done if [ "${STATUS_ACTION}" != "check" ]; then echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" - echo -en "${idsCL[LightCyan]}Starting processes to collect/monitor replication check : " + MSG="Starting processes to collect/monitor replication check" + c=0; cw=100; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + echo -en "${idsCL[LightCyan]}${MSG}${spc}: " fi for NTYPE in "${ntypesel[@]}"; do PH=${NTYPE}_HOSTS[0] @@ -66,12 +70,11 @@ STATUS(){ [ "${STATUS_ACTION}" != "check" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" fi if [ "${STATUS_ACTION}" == "" ] || [ "${STATUS_ACTION}" == "report" ] || [ "${STATUS_ACTION}" == "services" ] || [ "${STATUS_ACTION}" == "dockers" ] || [ "${STATUS_ACTION}" == "check" ] || [ "${STATUS_ACTION}" == "all" ]; then - - [ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]}Starting processes to collect node service & docker info : " + MSG="Starting processes to collect node service & docker info" + c=0; cw=100; spc=''; spc1=${cw}-${#MSG}; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + [ "${STATUS_ACTION}" != "check" ] && echo -en "${idsCL[LightCyan]}${MSG}${spc}: " for NTYPE in "${ntypesel[@]}"; do - until [ $(ls ${STATUSRUN_TMPFOLDER}/status-check.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do - tmp=tmp - done + until [ $(ls ${STATUSRUN_TMPFOLDER}/status-check.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do tmp=tmp; done STATUS_NODE ${NTYPE} > ${STATUSRUN_TMPFOLDER}/status-check.${NTYPE}.results 2>/dev/null & done [ "${STATUS_ACTION}" != "check" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"