Update dsmon.sh

This commit is contained in:
2025-06-14 10:25:08 -05:00
parent 2813ffb131
commit 66b68284da

View File

@@ -143,11 +143,12 @@ 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/*.result; do
for host in /tmp/dscheck.*.done; do
NTS=$(grep -oP '(?<=dscheck\.).*?(?=\.done)' <<< "${host}")
if [ -n "$NTS" ]; then
echo "'$host' = '$NTS'"
printf "%s\n" "$(cat /tmp/${NTS}.result)"
# printf "%s\n" "$(cat /tmp/dscheck.${NTS}.results)"
rm -f /tmp/dscheck.${NTS}.* >/dev/null 2>&1
((nc_count++))
fi