Update nodemgmt-scripts.sh

This commit is contained in:
2022-12-27 16:58:39 -06:00
parent 7c8cc1a0ec
commit 9bb76c42ee

View File

@@ -952,13 +952,13 @@ COPYCERTS_NPM(){
if [ -z $action ] || [ "${action}" = "gui" ]; then
DIVIDER true
fi
echo
#echo
for certdir in $(</tmp/ssllist); do
SUBJECT=$(${NCMD} openssl x509 -in ${certdir}cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
#echo ${ssldir}/${SUBJECT}
if [ ! -L ${ssldir}/${SUBJECT} ]; then
#echo "no folder found... creating"
echo "${SUBJECT} ... creating"
/bin/ln -s ${certdir} ${ssldir}/${SUBJECT}
fi
done