Update sites.inc

This commit is contained in:
2023-05-25 19:16:20 -05:00
parent cc750142a9
commit 985f6c2109

View File

@@ -549,6 +549,7 @@ SITEINFO(){
SUBJECTNAMES=$(openssl x509 -in ${certpath}/cert.pem -noout -text|grep -oP '(?<=DNS:|IP Address:)[^,]+'|sort -uV)
CERTEXPIRE=$(date -d "$(: | openssl x509 -in ${certpath}/cert.pem -text | grep 'Not After' |awk '{print $4,$5,$7}')" '+%s');
if [ "${SUBJECTNAMES}" != "" ]; then
echo "HERE: ${SUBJECTNAMES}"
SUBJECTNAMES=${SUBJECTNAMES//$'\n'/, }
# SUBJECTNAMES=$(echo $${SUBJECTNAMES} | sed "s/\n/, /g")
SUBJECTNAMES=$(echo ${SUBJECTNAMES} | sed "s/${SUBJECT}, //g")