From 07c4436855f6cd33c4116c47461eee9db0f4de70 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 9 Oct 2023 16:48:39 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- inc/status.inc | 15 ++++++--------- nodemgmt-scripts.sh | 8 +++++++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/defaults.inc b/defaults.inc index 809221d1..20625e45 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,5 +1,5 @@ #!/usr/bin/env bash -VERS='4.12.27-10092023' +VERS='4.12.28-10092023' noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense ' CERT_DAEMON='/snap/bin/certbot' diff --git a/inc/status.inc b/inc/status.inc index e8f87c84..876348a7 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -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 diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index cb2ef904..f72be7f4 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -15,6 +15,12 @@ source /opt/idssys/nodemgmt/inc/sites.inc source /opt/idssys/nodemgmt/inc/services.inc +if [ "${1}" == "report" ] || [ "${2}" == "report" ] || [ "${3}" == "report" ]; then + unset idsCL idsBG idsST + idsCL=('') + idsBG=('') + idsST=('') +fi BACKUP(){ @@ -834,7 +840,7 @@ GUI(){ done } # if [ ${action-x} ]; then - if [[ "${noheader}" != *" ${action} "* ]] && [[ "${noheader}" != *" ${2} "* ]] && [ "${2}" != "q" ] && [ "${3}" != "q" ] && [ "${1}" != "gui" ] && [ "${1}" != "nightlyrenew" ] && [ "${1}" != "update" ]; then + if [[ "${noheader}" != *" ${1} "* ]] && [[ "${noheader}" != *" ${2} "* ]] && [ "${2}" != "q" ] && [ "${3}" != "q" ] && [ "${1}" != "gui" ] && [ "${1}" != "nightlyrenew" ] && [ "${1}" != "update" ]; then DISP_HEADER fi case $action in