Update nodemgmt-scripts.sh
This commit is contained in:
@@ -87,8 +87,8 @@ LISTCERTS(){
|
||||
#DIVIDER true
|
||||
for certdir in /etc/letsencrypt/live/*/ ; do
|
||||
#SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject)
|
||||
SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
|
||||
SUBJECTNAMES=$(openssl x509 -in ${certdir}/cert.pem -noout -text|grep -oP '(?<=CN = )[^,]+'|sort -uV)
|
||||
SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
|
||||
SUBJECTNAMES=$(openssl x509 -in ${certdir}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
|
||||
IFS=':'; SUBJECTNAMES=(${SUBJECTNAMES//$'\n'/:}); unset IFS
|
||||
CERTEXPIRE=$(date -d "$(: | openssl x509 -in ${certdir}/cert.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
|
||||
DAYS=14; DUEIN=$(($(date +%s) + (86400*$DAYS)));
|
||||
|
||||
Reference in New Issue
Block a user