This commit is contained in:
2023-11-22 23:09:02 -06:00
parent 26dd6b81ae
commit 00640cf822
2 changed files with 19 additions and 5 deletions

View File

@@ -155,7 +155,7 @@ NIGHTLYRENEW(){
CONCAT_SSL
chown -R root:le ${NM_CERTPATH}
chmod -R 6775 ${NM_CERTPATH}
SERVICE_MGMT nginx reload >> ${NM_LOGFOLDER}/cert-renewal.lastrun
SERVICE_MGMT nginx reload
}
CONCAT_SSL(){
@@ -621,6 +621,17 @@ CHECK-CERTS(){
fi
}
UPGRADECERTS(){
ssldir=$(${NCMD} find ${NM_CERTPATH}/live/* -type d)
i=1
for certdir in ${ssldir[@]}; do
SUBJECTNAMES=$(${NCMD} openssl x509 -in ${certdir}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/, }
SUBJECTNAMES=${SUBJECTNAMES//, /,}
echo "$certdir = $SUBJECTNAMES "
done
}