Update status.inc

This commit is contained in:
2023-12-06 20:37:09 -06:00
parent 3275932c91
commit 2bc7c302df

View File

@@ -143,23 +143,27 @@ 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
echo "H: ${nodestatus}"
NTS=$(grep -oP '(?<=status-check.).*?(?=.done)' <<< "${nodestatus}")
echo -e "$(cat ${STATUSRUN_TMPFOLDER}/status-check.${NTS}.running)"
rm -f ${STATUSRUN_TMPFOLDER}/status-check.${NTS}.done
(($nc_count++))
done
[ ${nc_count} -eq ${#ntypesel[@]} ] && completed=true
done
for NTYPE in "${ntypesel[@]}"; do
completed=false
until [ "${completed}" == "true" ]; do
if [ -f ${STATUSRUN_TMPFOLDER}/status-check.${NTYPE}.done ]; then
completed=true
# echo -e "$(cat ${STATUSRUN_TMPFOLDER}/status-check.${NTYPE}.running)"
fi
done
done
# for NTYPE in "${ntypesel[@]}"; do
# completed=false
# until [ "${completed}" == "true" ]; do
# if [ -f ${STATUSRUN_TMPFOLDER}/status-check.${NTYPE}.done ]; then
# completed=true
# echo -e "$(cat ${STATUSRUN_TMPFOLDER}/status-check.${NTYPE}.running)"
# fi
# done
# done
fi