Update nodemgmt-scripts.sh

This commit is contained in:
2019-02-11 14:00:46 -06:00
parent a36187301d
commit 10ab9c33fa

View File

@@ -607,6 +607,7 @@ LISTCERTS(){
DIVIDER false yellow 100
for certdir in $(</tmp/ssllist); do
echo $certdir
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.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');