Update nodemgmt-scripts.sh
This commit is contained in:
@@ -790,6 +790,33 @@ LISTCERTS_NPM(){
|
|||||||
fi
|
fi
|
||||||
echo ""
|
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(){
|
CHECK-CERTS(){
|
||||||
if [ "${1}" = "check" ]; then
|
if [ "${1}" = "check" ]; then
|
||||||
@@ -2125,6 +2152,7 @@ if [ ${action-x} ]; then
|
|||||||
delssl) DEL-SSL ${2};;
|
delssl) DEL-SSL ${2};;
|
||||||
listcerts) LISTCERTS;;
|
listcerts) LISTCERTS;;
|
||||||
listcerts-npm) LISTCERTS_NPM;;
|
listcerts-npm) LISTCERTS_NPM;;
|
||||||
|
copynpmcerts) COPYCERTS_NPM;;
|
||||||
checkcerts) CHECK-CERTS ${2};;
|
checkcerts) CHECK-CERTS ${2};;
|
||||||
nightlyrenew) NIGHTLYRENEW;;
|
nightlyrenew) NIGHTLYRENEW;;
|
||||||
delsite) DELSITE ${2} ${3} ${4} ${5};;
|
delsite) DELSITE ${2} ${3} ${4} ${5};;
|
||||||
|
|||||||
Reference in New Issue
Block a user