Update dsmon.sh
This commit is contained in:
4
dsmon.sh
4
dsmon.sh
@@ -158,7 +158,7 @@ CHECK(){
|
|||||||
[ "${1}" != "report" ] && echo -e "\r\033[2K${idsCL[LightCyan]}${MSG}${spc}: ${idsCL[LightGreen]}Done${idsCL[Default]}"
|
[ "${1}" != "report" ] && echo -e "\r\033[2K${idsCL[LightCyan]}${MSG}${spc}: ${idsCL[LightGreen]}Done${idsCL[Default]}"
|
||||||
|
|
||||||
shopt -s nullglob
|
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 [ "${completed}" == "true" ]; do
|
||||||
until [ $(ls /tmp/dscheck.*.done 2>/dev/null | wc -l) -gt 0 ]; do tmp=tmp; done
|
until [ $(ls /tmp/dscheck.*.done 2>/dev/null | wc -l) -gt 0 ]; do tmp=tmp; done
|
||||||
for host in /tmp/dscheck.*.done; do
|
for host in /tmp/dscheck.*.done; do
|
||||||
@@ -172,7 +172,7 @@ CHECK(){
|
|||||||
((nc_count++))
|
((nc_count++))
|
||||||
fi
|
fi
|
||||||
done
|
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 "")
|
[ "${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 "")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user