Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-10 17:00:09 -06:00
parent ca180c4b98
commit 199dcb9baf

View File

@@ -600,9 +600,8 @@ LISTCERTS(){
SED=$(which sed)
CERTDATE=$(${OPENSSL} x509 -in ${certdir}/cert.pem -text -enddate | grep 'Not After')
COMMONNAME=$(${OPENSSL} x509 -in ${certdir}/cert.pem -text -subject | \
CERTDATE=$(${OPENSSL} x509 -in ${certdir}/cert.pem -text -enddate -noout -inform pem | ${SED} 's/notAfter\=//')
COMMONNAME=$(${OPENSSL} x509 -in ${certdir}/cert.pem -text -subject -noout -inform pem | \
${SED} -e 's/.*CN=//' | \
${SED} -e 's/\/.*//')