Update nodemgmt-scripts.sh

This commit is contained in:
2022-10-15 23:16:39 -05:00
parent 57d9803a3f
commit d9fafb7d6f

View File

@@ -791,7 +791,7 @@ LISTCERTS_NPM(){
echo ""
}
COPYCERTS_NPM(){
ssldir='/opt/nginx-proxy/ssl'
declare -i cw; declare -i spc1; declare -i c
if [ ! -z ${LOCAL_SERVICES+x} ]; then
NCMD="ssh root@${MYSQL_HOSTS[0]}"
@@ -809,8 +809,8 @@ COPYCERTS_NPM(){
for certdir in $(</tmp/ssllist); do
SUBJECT=$(${NCMD} openssl x509 -in ${certdir}cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
if [ -L ${my_link} ]; then
if [ -L ${ssldir}/${SUBJECT} ]; then
/bin/ln -s ${certdir} ${ssldir}/${SUBJECT}
fi
done
echo