Update dsmon.sh

This commit is contained in:
2025-06-13 21:19:25 -05:00
parent 1b26abeda3
commit 53fdf50207

View File

@@ -143,13 +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
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)' <<< "${host}")
if [ "${NTS}" != "*" ]; then
echo -e "$(cat /tmp/dscheck.${NTS}.results)"
cp -f /tmp/dscheck.${NTS}.results /tmp/${NTS}.result
rm -f /tmp/dscheck.${NTS}.*
rm -f /tmp/dscheck.${NTS}.* >/dev/null 2>&1
((nc_count++))
fi
done