Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-11 13:59:31 -06:00
parent 1c1d2dce87
commit 1cefb7c3fb

View File

@@ -609,7 +609,7 @@ LISTCERTS(){
for certdir in $(</tmp/ssllist); do
SUBJECT=$(${NCMD} openssl x509 -in "${certdir}/cert.pem" -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
SUBJECTNAMES=$(${NCMD} openssl x509 -in "${certdir}/cert.pem" -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
CERTEXPIRE=$(date -d "$(: | ${NCMD} openssl x509 -in \"${certdir}/cert.pe\" -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
CERTEXPIRE=$(date -d "$(: | ${NCMD} openssl x509 -in \"${certdir}/cert.pem\" -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/, }
SUBJECTNAMES=$(echo $SUBJECTNAMES | sed "s/${SUBJECT}, //g")