From ff185dfe70b86c4188f716a8c6c2f63aaa713c93 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 29 Jan 2023 10:05:33 -0600 Subject: [PATCH] Update nodemgmt-scripts.sh --- nodemgmt-scripts.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 3e62bdff..93eb46d3 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -1048,12 +1048,18 @@ CHECK_NPMCERTS(){ ENDDATE=$(openssl x509 -in ${certdir}/cert.pem -noout -enddate | awk -F '=' '{print $2}') DAYS=$(dateutils.ddiff today "$(date --date="${ENDDATE}" '+%F')" -f '%d') + c=0; cw=35; spc='' + spc1=`expr ${cw} - ${#SUBJECT}` + until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done + if [ ${DAYS} -lt 24 ]; then - echo "${SUBJECT} ... ${DAYS} days remaining" + echo "${SUBJECT}:${spc}${DAYS} days remaining" fi done + echo + } CHECK-CERTS(){