From 2813ffb13196c58fc36a95eecde822236b41d1b0 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 14 Jun 2025 10:24:07 -0500 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index f37245c..97be8f6 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -143,11 +143,11 @@ 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 - for host in /tmp/dscheck.*.result; do + for host in /tmp/*.result; do NTS=$(grep -oP '(?<=dscheck\.).*?(?=\.done)' <<< "${host}") if [ -n "$NTS" ]; then echo "'$host' = '$NTS'" - printf "%s\n" "$(cat /tmp/dscheck.${NTS}.result)" + printf "%s\n" "$(cat /tmp/${NTS}.result)" rm -f /tmp/dscheck.${NTS}.* >/dev/null 2>&1 ((nc_count++)) fi