update
This commit is contained in:
@@ -497,7 +497,7 @@ NEWPROXYSITE_CREATE(){
|
||||
else
|
||||
[ "${MAIN_SITE}" != "${SITENAME}" ] && [ -f ${NM_NGINXPATH}/sites-enabled/${SITENAME}.conf ] && mv ${NM_NGINXPATH}/sites-enabled/${SITENAME}.conf ${nginxconfig}
|
||||
if [ ! -f ${nginxconfig} ]; then
|
||||
echo -en "${idsCL[LightCyan]}Configuring initial NGINX Site config ... ${idsCL[Default]}"
|
||||
echo -en "${idsCL[LightCyan]}Configuring initial NGINX Site config ... "
|
||||
cp ${NM_FOLDER}/templates/nginx.proxy.site ${nginxconfig}
|
||||
sed -i "s/<<SERVER_NAME>>/${NGINX_SERVERNAME//,/ }/g" ${nginxconfig}
|
||||
sed -i "s/<<MAIN_SITE>>/${MAIN_SITE}/g" ${nginxconfig}
|
||||
@@ -510,19 +510,19 @@ NEWPROXYSITE_CREATE(){
|
||||
else
|
||||
oldservernames=$(grep 'server_name' ${nginxconfig});oldservernames=${oldservernames//;/};oldservernames=${oldservernames#* };oldservernames=${oldservernames// /,}
|
||||
if [ "${MAIN_SITE}" != "${SITENAME}" ]; then
|
||||
echo -e "${idsCL[LightCyan]}Detected MAIN_SITE name change, making necesary adjustments ... ${idsCL[Default]}"
|
||||
echo -e "${idsCL[LightCyan]}Detected MAIN_SITE name change, making necesary adjustments ... "
|
||||
echo -en "\n${idsCL[LightCyan]}Removing old SSL Cert ... "
|
||||
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 ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||
NEWCERT -expand ${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 -e "\n${idsCL[LightCyan]}Updating SSL Cert for hostname changes, select 'E'xpand when prompted:"
|
||||
NEWCERT ${NGINX_SERVERNAME}
|
||||
echo -en "\n${idsCL[LightCyan]}Updating SSL Cert for hostname changes ... "
|
||||
NEWCERT -expand ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n"
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user