Update dsmon.sh

This commit is contained in:
2025-06-14 10:22:54 -05:00
parent a0e1a856de
commit 10b3fe545f

View File

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