From 19507a91c6f60008a21a1235e82c135b2357a737 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 14 Jun 2025 13:28:22 -0500 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index 6cb6e14..fbeb7ed 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -152,10 +152,10 @@ CHECK(){ unbuffer bash -c "/usr/local/bin/dsmon runcheck '${hostname}'" > /tmp/dscheck.${hostname}.results & # unbuffer RUN_CHECK "$hostname" > /tmp/dscheck.${hostname}.results & ((started_hosts++)) - printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d/%d hosts ..." "${started_hosts}" "${#hostnames_sort[@]}" + printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts ..." "${started_hosts}" "${#hostnames_sort[@]}" done - [ "${1}" != "report" ] && echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}" - + [ "${1}" != "report" ] && echo -e "\r${idsCL[LightCyan]}${MSG}${spc}: Done${idsCL[Default]}" + sleep 2 shopt -s nullglob nc_count=0; completed=false; scanstart=$(date +%s) until [ "${completed}" == "true" ]; do @@ -163,7 +163,6 @@ CHECK(){ for host in /tmp/dscheck.*.done; do NTS=$(grep -oP '(?<=dscheck\.).*?(?=\.done)' <<< "${host}") if [ -n "$NTS" ]; then - echo "'$host' = '$NTS'" while IFS= read -r line; do printf "%s\n" "$line" done < /tmp/dscheck.${NTS}.results