Update dsmon.sh
This commit is contained in:
5
dsmon.sh
5
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
|
||||
|
||||
Reference in New Issue
Block a user