Update dsmon.sh
This commit is contained in:
2
dsmon.sh
2
dsmon.sh
@@ -161,7 +161,6 @@ CHECK(){
|
||||
nc_count=0; lc_count=0; completed=false; scanstart=$(date +%s)
|
||||
until [ "${completed}" == "true" ]; do
|
||||
until [ $(ls /tmp/dscheck.*.done 2>/dev/null | wc -l) -gt 0 ]; do tmp=tmp; done
|
||||
|
||||
for host in /tmp/dscheck.*.done; do
|
||||
NTS=$(grep -oP '(?<=dscheck\.).*?(?=\.done)' <<< "${host}")
|
||||
if [ -n "$NTS" ]; then
|
||||
@@ -177,7 +176,6 @@ CHECK(){
|
||||
[ "${1}" != "report" ] && [ ${lc_count} -gt 0 ] && echo -e "\r\033[2K"
|
||||
|
||||
if [ "${1}" != "report" ]; then
|
||||
[ ${nc_count} -gt 0 ] && [ $(($(date +%s)-scanstart)) -gt 2 ] && echo -e "\r\033[2K"
|
||||
[ ${nc_count} -gt ${lc_count} ] && echo
|
||||
printf "\r${idsCL[LightCyan]}Completed on %d of %d hosts %s${idsCL[Default]}" "${nc_count}" "${#hostnames_sort[@]}" $([[ "$nc_count" -lt "${#hostnames_sort[@]}" ]] && echo " ..." || echo "")
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user