update
This commit is contained in:
@@ -5,7 +5,7 @@ CERTSERVER="https://acme-v02.api.letsencrypt.org/directory"
|
||||
CERTCHAIN="ISRG Root X1"
|
||||
|
||||
NEWCERT(){
|
||||
CERTTEST=0; CERTEXPAND=""; CERTENC='ecdsa'
|
||||
CERTTEST=0; CERTEXPAND=""; CERTENC='ecdsa'; NONGINXRESTART=0
|
||||
if [ "${3}" != "" ] && ([ "${3}" == "0" ] || [ "${3}" == "1" ]); then
|
||||
NEW_CERT=${1}
|
||||
NEWSITE=${2}
|
||||
@@ -17,6 +17,7 @@ NEWCERT(){
|
||||
-newsite) NEWSITE=true;;
|
||||
-expand) CERTEXPAND='--expand';;
|
||||
-rsa) CERTENC='rsa';;
|
||||
-nnr) NONGINXRESTART=1;;
|
||||
-h|-help|--help)
|
||||
echo -e "Usage: ${idsCL[Yellow]}[nodemgmt or nmg] newcert {hostname}${idsCL[Default]} {"
|
||||
width=35
|
||||
@@ -84,16 +85,8 @@ NEWCERT(){
|
||||
sed -i "s/#include conf.d\/include\/ssl-ciphers.conf/include conf.d\/include\/ssl-ciphers.conf/g" ${NM_NGINXPATH}/sites-available/${MAIN_CERT}.conf
|
||||
sed -i "s/#include conf.d\/include\/force-ssl.conf/include conf.d\/include\/force-ssl.conf/g" ${NM_NGINXPATH}/sites-available/${MAIN_CERT}.conf
|
||||
DIVIDER true
|
||||
# if [ "${NEWSITE}" != "true" ]; then
|
||||
# echo -e -n "${idsCL[LightCyan]}Restart NGINX on all Nodes (Y/n): ${idsCL[Default]}"
|
||||
# read -n 1 NGINXRELOAD
|
||||
# if [[ ${NGINXRELOAD} =~ ^[Nn]$ ]]; then
|
||||
# tmp=''
|
||||
# else
|
||||
# echo
|
||||
SERVICE_MGMT nginx restart
|
||||
# fi
|
||||
# fi
|
||||
|
||||
[ ${NONGINXRESTART} -eq 0 ] && SERVICE_MGMT nginx restart
|
||||
fi
|
||||
echo
|
||||
echo -e "${idsCL[Green]}Certificate has been successfully created for '${idsCL[Yellow]}${NEW_CERT}${idsCL[Green]}'...${idsCL[Default]}"
|
||||
|
||||
Reference in New Issue
Block a user