update
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user