From fc51fcada8e71310f0b268688b50602d4e0d2c1c Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 6 Dec 2023 20:53:42 -0600 Subject: [PATCH] Update status.inc --- inc/status.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/status.inc b/inc/status.inc index eeea1bec..1b22801e 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -143,15 +143,17 @@ STATUS(){ for NTYPE in "${ntypesel[@]}"; do STATUS_NODE ${NTYPE} > ${STATUSRUN_TMPFOLDER}/status-check.${NTYPE}.running & done + nc_count=0; completed=false until [ "${completed}" == "true" ]; do - for nodestatus in "${STATUSRUN_TMPFOLDER}/status-check.*.done"; do + for nodestatus in ${STATUSRUN_TMPFOLDER}/status-check.*.done; do NTS=$(grep -oP '(?<=status-check.).*?(?=.done)' <<< "${nodestatus}") - echo -e "$(cat ${STATUSRUN_TMPFOLDER}/status-check.${NTS}.running)" + # echo -e "$(cat ${STATUSRUN_TMPFOLDER}/status-check.${NTS}.running)" rm -f ${STATUSRUN_TMPFOLDER}/status-check.${NTS}.done (($nc_count++)) + echo "${NTS} == ${nc_count} == ${nodestatus}" done - [ ${nc_count} -eq ${#ntypesel[@]} ] && completed=true + [ ${nc_count} -eq ${#ntypesel[@]} ] && completed=true || sleep 1s done