From 3a1b79b8dd6a24da166a0930f7f176c24661b265 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 11 Feb 2019 14:08:16 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 452133f7..90cdf552 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -578,6 +578,7 @@ NIGHTLYRENEW(){ } LISTCERTS(){ + declare -i cw; declare -i spc1; declare -i c declare -A CHECKCERT_DOMAINS IFS=$'\n' for LINE in `egrep -v '(^#|^$)' ${FOLDER}/ssl-cert-check/ssldomains`; do @@ -617,10 +618,8 @@ LISTCERTS(){ IFS=', '; SUBJECT_NAMES=(${SUBJECTNAMES}); unset IFS DAYS=14; DUEIN=$(($(date +%s) + (86400*$DAYS))); - declare -i cw; declare -i spc1; declare -i c c=0; cw=30; spc='' spc1=${cw}-${#SUBJECT} - until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done if [ $DUEIN -gt $CERTEXPIRE ]; then date="${idsST[Bold]}${idsCL[Red]}$(date -d @${CERTEXPIRE} '+%m-%d-%Y')${idsST[Reset]}${idsCL[Default]}" else @@ -629,6 +628,7 @@ LISTCERTS(){ if [ "${CHECKCERT_DOMAINS[${SUBJECT}]}" = "" ]; then SUBJECT_DISP="${SUBJECT}" + until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done else SUBJECT_DISP="${idsBG[Green]}${idsCL[White]}${SUBJECT}${idsBG[Default]}${idsCL[Cyan]}" spc="${idsBG[Green]}"