Update dsmon.sh

This commit is contained in:
2025-06-14 13:56:38 -05:00
parent a4fba60410
commit 1231a753c7

View File

@@ -158,7 +158,7 @@ CHECK(){
[ "${1}" != "report" ] && echo -e "\r\033[2K${idsCL[LightCyan]}${MSG}${spc}: ${idsCL[LightGreen]}Done${idsCL[Default]}"
shopt -s nullglob
nc_count=0; completed=false; scanstart=$(date +%s)
nc_count=0; lc_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
@@ -172,7 +172,7 @@ CHECK(){
((nc_count++))
fi
done
[ "${nc_count}" != "${lc_count}" ] && echo
[ ${nc_count} -gt ${lc_count} ] && echo
[ "${1}" != "report" ] && printf "\r${idsCL[LightCyan]}Completed on %d of %d hosts %s${idsCL[Default]}" "${nc_count}" "${#hostnames_sort[@]}" $([[ "$nc_count" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "")