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(){