Update sites.inc

This commit is contained in:
2023-11-12 10:30:29 -06:00
parent b5393cc131
commit c80680c235

View File

@@ -513,7 +513,8 @@ NEWPROXYSITE_CREATE(){
echo -en "\n${idsCL[LightCyan]}Requesting new SSL Cert ... "
NEWCERT ${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/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:"
@@ -590,6 +591,7 @@ SITEINFO(){
onefacline=${onefacline%%:*}
twofacline=$(ssh root@${NM_AUTHELIA_IP} grep -Fn two_factor /mnt/web-data/authelia/config/configuration.yml | sort | tail -n1)
twofacline=${twofacline%%:*}
autheliaconfig=$(ssh root@${NM_AUTHELIA_IP} cat ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml)
fi
gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled
@@ -633,9 +635,9 @@ SITEINFO(){
[ "$(grep '\#include conf.d/include/block-exploits.conf' ${sitefile})" != "" ] && explt='' || explt='Yes'
# [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" != "" ] && lock='' || lock='Yes'
if [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" == "" ] && [ "$(grep 'include conf.d/include/secure-access.conf' ${sitefile})" != "" ]; then
if [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" == "" ]; then
sitefacline=$(ssh root@${NM_AUTHELIA_IP} grep -Fn ${site} /mnt/web-data/authelia/config/configuration.yml)
sitefacline=$(grep -Fn ${site} ${autheliaconfig})
sitefacline=${sitefacline%%:*}
if [ "${sitefacline}" == "" ]; then
lock='error'