Update dsmon.sh

This commit is contained in:
2025-06-14 13:32:06 -05:00
parent 985d03e208
commit e3b7830449

View File

@@ -152,7 +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++))
printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts ..." "${started_hosts}" "${#hostnames_sort[@]}"
printf "\r${idsCL[LightCyan]}${MSG}${spc}: Started on %d of %d hosts ...${idsCL[Default]}" "${started_hosts}" "${#hostnames_sort[@]}"
done
[ "${1}" != "report" ] && echo -e "\r\033[2K${idsCL[LightCyan]}${MSG}${spc}: ${idsCL[LightGreen]}Done${idsCL[Default]}"
@@ -171,6 +171,7 @@ CHECK(){
((nc_count++))
fi
done
printf "\n${idsCL[LightCyan]}Completed on %d of %d hosts ...${idsCL[Default]}" "${nc_count}" "${#hostnames_sort[@]}"
if [ $(($(date +%s)-scanstart)) -gt 300 ]; then
SENDNOTICE "DSmon Scan Stuck" "DSmon Check scan has been running for 10mins, klling all bash...." 1