Update dsmon.sh

This commit is contained in:
2025-06-14 23:11:11 -05:00
parent 7a9f32e63b
commit 0073373a9d

View File

@@ -172,7 +172,6 @@ CHECK(){
done done
if [ "${1}" != "report" ]; then if [ "${1}" != "report" ]; then
# [ ${nc_count} -gt ${lc_count} ] &&
[ ${nc_count} -gt 0 ] && echo [ ${nc_count} -gt 0 ] && 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 "") 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 fi
@@ -222,8 +221,8 @@ RUN_CHECK(){
MSG=" ${host_name[$hostid]}" MSG=" ${host_name[$hostid]}"
MSG2="[ ${host_ip[$hostid]} ] " MSG2="[ ${host_ip[$hostid]} ] "
c=0; cw=68; spc=''; spc1=`expr ${cw} - ${#MSG}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done c=0; cw=65; spc=''; spc1=`expr ${cw} - ${#MSG}`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done
c=0; cw2=17; spcB=''; spc1=`expr ${cw2} - ${#MSG2}`; until [ $c = ${spc1} ]; do spcB="${spcB} "; c=`expr $c + 1`; done c=0; cw2=20; spcB=''; spc1=`expr ${cw2} - ${#MSG2}`; until [ $c = ${spc1} ]; do spcB="${spcB} "; c=`expr $c + 1`; done
DIVIDER 1 . 85 DIVIDER 1 . 85
echo -e "${idsST[Bold]}${idsBG[Blue]}${idsCL[White]}${MSG}${spc}${MSG2}${spcB}${idsST[Reset]}" echo -e "${idsST[Bold]}${idsBG[Blue]}${idsCL[White]}${MSG}${spc}${MSG2}${spcB}${idsST[Reset]}"
DIVIDER . . 85 DIVIDER . . 85