Update dsmon.sh

This commit is contained in:
2024-01-06 23:36:15 -06:00
parent c6a9e3a9ed
commit f7ef02deef

View File

@@ -142,9 +142,9 @@ CHECK(){
nc_count=0; completed=false; scanstart=$(date +%s)
until [ "${completed}" == "true" ]; do
until [ $(ls /tmp/dscheck.*.done 2>/dev/null | wc -l) -gt 0 ]; do tmp=tmp; done
# until [ $(ls /tmp/dscheck.*.done 2>/dev/null | wc -l) -gt 0 ]; do tmp=tmp; done
for host in /tmp/dscheck.*.done; do
NTS=$(grep -oP '(?<=dscheck.).*?(?=.done)' <<< "${nodestatus}")
NTS=$(grep -oP '(?<=dscheck.).*?(?=.done)' <<< "${host}")
if [ "${NTS}" != "*" ]; then
hoststatus=$(cat /tmp/dscheck.${NTS}.results)
[ "${hoststatus}" != "" ] && echo -e "${hoststatus}"