Update sites.inc
This commit is contained in:
@@ -425,14 +425,14 @@ NEWPROXYSITE_CREATE(){
|
||||
DEL-SSL ${SITENAME} >/dev/null 2>&1
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n"
|
||||
echo -en "\n${idsCL[LightCyan]}Requesting new SSL Cert ... "
|
||||
NEWCERT ${CERTTEST} -expand -newsite ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||
NEWCERT ${CERTTEST}-expand -newsite ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n"
|
||||
# sed -i "s/live\/${SITENAME}\//live\/${MAIN_SITE}\//g" ${nginxconfig}
|
||||
sed -i "s/\/${SITENAME}/\/${MAIN_SITE}/g" ${nginxconfig}
|
||||
|
||||
elif [ "${oldservernames}" != "${NGINX_SERVERNAME}" ]; then
|
||||
echo -en "\n${idsCL[LightCyan]}Updating SSL Cert for hostname changes ... "
|
||||
NEWCERT ${CERTTEST} -expand -newsite ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||
NEWCERT ${CERTTEST}-expand -newsite ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n"
|
||||
|
||||
fi
|
||||
@@ -449,14 +449,13 @@ NEWPROXYSITE_CREATE(){
|
||||
if [ ! -f ${NM_CERTPATH}/live/${MAIN_SITE}/cert.pem ]; then
|
||||
echo -e "\n${idsCL[LightCyan]}No SSL cert detected, will generate one now ... "
|
||||
SERVICE_MGMT nginx restart
|
||||
NEWCERT ${CERTTEST} -newsite ${NGINX_SERVERNAME}
|
||||
NEWCERT ${CERTTEST}-newsite ${NGINX_SERVERNAME}
|
||||
echo
|
||||
else
|
||||
sed -i "s/#ssl_certificate/ssl_certificate/g" ${nginxconfig}
|
||||
sed -i "s/#listen 443/listen 443/g" ${nginxconfig}
|
||||
sed -i "s/#include conf.d\/include\/ssl-ciphers.conf/include conf.d\/include\/ssl-ciphers.conf/g" ${nginxconfig}
|
||||
sed -i "s/#include conf.d\/include\/force-ssl.conf/include conf.d\/include\/force-ssl.conf/g" ${nginxconfig}
|
||||
echo
|
||||
fi
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user