This commit is contained in:
2023-11-15 14:44:07 -06:00
parent 2ab3901144
commit 513a61bf5a
3 changed files with 12 additions and 64 deletions

View File

@@ -475,11 +475,11 @@ LISTCERTS_NPM(){
if [ ! -z ${LOCAL_SERVICES+x} ]; then
NCMD="ssh root@${MYSQL_HOSTS[0]}"
${NCMD} rm -f /tmp/ssllist
${NCMD} 'for certdir in /opt/nginx-proxy/letsencrypt/live/*/ ; do echo $certdir; done' > /tmp/ssllist
${NCMD} 'for certdir in ${NM_CERTPATH}/live/*/ ; do echo $certdir; done' > /tmp/ssllist
else
NCMD=''
rm -f /tmp/ssllist
for certdir in /opt/nginx-proxy/letsencrypt/live/*/ ; do echo $certdir; done > /tmp/ssllist
for certdir in ${NM_CERTPATH}/live/*/ ; do echo $certdir; done > /tmp/ssllist
fi
if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true
@@ -536,7 +536,7 @@ LISTCERTS_NPM(){
echo
}
COPYCERTS_NPM(){
ssldir='/opt/nginx-proxy/ssl'
ssldir='${NM_CERTPATH}/ssl'
if [ "${1}" = "reset" ]; then
echo "Resetting ... Deleting all SSL symlink folders"
@@ -556,7 +556,7 @@ COPYCERTS_NPM(){
DIVIDER true
fi
ssls=$(find /opt/nginx-proxy/letsencrypt/live/* -type d)
ssls=$(find ${NM_CERTPATH}/live/* -type d)
for certdir in ${ssls[@]}; do
SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
if [ ! -L ${ssldir}/${SUBJECT} ]; then
@@ -574,7 +574,7 @@ COPYCERTS_NPM(){
}
CHECK_NPMCERTS(){
ssls=$(find /opt/nginx-proxy/letsencrypt/live/* -type d)
ssls=$(find ${NM_CERTPATH}/live/* -type d)
for certdir in ${ssls[@]}; do
SUBJECT=$(openssl x509 -in ${certdir}/cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)