This commit is contained in:
2023-10-09 16:48:39 -05:00
parent 1681d3f465
commit 07c4436855
3 changed files with 14 additions and 11 deletions

View File

@@ -2,12 +2,7 @@
STATUS(){
start=`date +%s`
ST_ACTION=${1}
if [ "${1}" == "report" ] || [ "${2}" == "report" ] || [ "${3}" == "report" ]; then
unset idsCL idsBG idsST
idsCL=('')
idsBG=('')
idsST=('')
elif [ "${ST_ACTION}" = "sync" ]; then
if [ "${ST_ACTION}" = "sync" ]; then
ST_ACTION=repl
fi
declare -i cw; declare -i spc1; declare -i c
@@ -613,12 +608,14 @@ It was down for $(SHOW_TIME ${toterrtime})"
DIVIDER false green
fi
[ "${ST_ACTION}" != "check" ] && echo -en " ${idsCL[LightCyan]}Getting drives from server ... ${idsCL[Default]}"
[ "${ST_ACTION}" != "check" ] && [ "${2}" != "report" ] && echo -en " ${idsCL[LightCyan]}Getting drives from server ... ${idsCL[Default]}"
declare -A partitions
DRIVEINFO=$(ssh root@${nip} df -BM | grep -vE '^Filesystem|tmpfs|cdrom|@|ram|loop|udev|veeamimage|nvme|localhost|shm|mmcblk|overlay|-volume|Music|Software' | awk '{ print $1 " " $2 " " $4 }')
DRIVEINFO=(${DRIVEINFO})
echo -en "\e[1A";
echo -e "\e[0K\r"
if [ "${2}" != "report" ]; then
echo -en "\e[1A"
echo -e "\e[0K\r"
fi
NUMDRIVES=$((${#DRIVEINFO[@]} / 3))
for ((i = 0 ; i <= $((${NUMDRIVES}-1)) ; i++)); do