From 1fc8507224258411cebd1e12da73593e264c46e3 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 14 Jun 2025 13:50:24 -0500 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index 233bf0b..2b34506 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -152,8 +152,7 @@ CHECK(){ unbuffer bash -c "/usr/local/bin/dsmon runcheck '${hostname}'" > /tmp/dscheck.${hostname}.results & # unbuffer RUN_CHECK "$hostname" > /tmp/dscheck.${hostname}.results & ((started_hosts++)) - [ "${1}" != "report" ] && - printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts %s${idsCL[Default]}" "${started_hosts}" "${#hostnames_sort[@]}" $([[ "$started_hosts" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "") + [ "${1}" != "report" ] && printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts %s${idsCL[Default]}" "${started_hosts}" "${#hostnames_sort[@]}" $([[ "$started_hosts" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "") done [ "${1}" != "report" ] && echo -e "\r\033[2K${idsCL[LightCyan]}${MSG}${spc}: ${idsCL[LightGreen]}Done${idsCL[Default]}" @@ -173,7 +172,7 @@ CHECK(){ ((nc_count++)) fi done - [ "${1}" != "report" ] && printf "\r\n\r${idsCL[LightCyan]}Completed on %d of %d hosts %s${idsCL[Default]}\n" "${nc_count}" "${#hostnames_sort[@]}" $([[ "$nc_count" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "") + [ "${1}" != "report" ] && printf "\r\n\r${idsCL[LightCyan]}Completed on %d of %d hosts %s${idsCL[Default]}" "${nc_count}" "${#hostnames_sort[@]}" $([[ "$nc_count" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "") if [ $(($(date +%s)-scanstart)) -gt 300 ]; then