Update nodemgmt-scripts.sh
This commit is contained in:
@@ -790,6 +790,33 @@ LISTCERTS_NPM(){
|
||||
fi
|
||||
echo ""
|
||||
}
|
||||
COPYCERTS_NPM(){
|
||||
declare -i cw; declare -i spc1; declare -i c
|
||||
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
|
||||
else
|
||||
NCMD=''
|
||||
rm -f /tmp/ssllist
|
||||
for certdir in /opt/nginx-proxy/letsencrypt/live/*/ ; do echo $certdir; done > /tmp/ssllist
|
||||
fi
|
||||
if [ -z $action ] || [ "${action}" = "gui" ]; then
|
||||
DIVIDER true
|
||||
fi
|
||||
echo
|
||||
|
||||
for certdir in $(</tmp/ssllist); do
|
||||
SUBJECT=$(${NCMD} openssl x509 -in ${certdir}cert.pem -noout -subject|grep -oP '(?<=CN = )[^,]+'|sort -uV)
|
||||
|
||||
done
|
||||
echo
|
||||
if [ -z $action ] || [ "${action}" = "gui" ]; then
|
||||
DIVIDER true
|
||||
ENTER2CONTINUE
|
||||
fi
|
||||
echo ""
|
||||
}
|
||||
|
||||
CHECK-CERTS(){
|
||||
if [ "${1}" = "check" ]; then
|
||||
@@ -2125,6 +2152,7 @@ if [ ${action-x} ]; then
|
||||
delssl) DEL-SSL ${2};;
|
||||
listcerts) LISTCERTS;;
|
||||
listcerts-npm) LISTCERTS_NPM;;
|
||||
copynpmcerts) COPYCERTS_NPM;;
|
||||
checkcerts) CHECK-CERTS ${2};;
|
||||
nightlyrenew) NIGHTLYRENEW;;
|
||||
delsite) DELSITE ${2} ${3} ${4} ${5};;
|
||||
|
||||
Reference in New Issue
Block a user