Update sites.inc
This commit is contained in:
@@ -513,7 +513,8 @@ NEWPROXYSITE_CREATE(){
|
|||||||
echo -en "\n${idsCL[LightCyan]}Requesting new SSL Cert ... "
|
echo -en "\n${idsCL[LightCyan]}Requesting new SSL Cert ... "
|
||||||
NEWCERT ${NGINX_SERVERNAME} >/dev/null 2>&1
|
NEWCERT ${NGINX_SERVERNAME} >/dev/null 2>&1
|
||||||
echo -e "${idsCL[LightGreen]}Done${idsCL[Default]}\n"
|
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
|
elif [ "${oldservernames}" != "${NGINX_SERVERNAME}" ]; then
|
||||||
echo -e "\n${idsCL[LightCyan]}Updating SSL Cert for hostname changes, select 'E'xpand when prompted:"
|
echo -e "\n${idsCL[LightCyan]}Updating SSL Cert for hostname changes, select 'E'xpand when prompted:"
|
||||||
@@ -590,6 +591,7 @@ SITEINFO(){
|
|||||||
onefacline=${onefacline%%:*}
|
onefacline=${onefacline%%:*}
|
||||||
twofacline=$(ssh root@${NM_AUTHELIA_IP} grep -Fn two_factor /mnt/web-data/authelia/config/configuration.yml | sort | tail -n1)
|
twofacline=$(ssh root@${NM_AUTHELIA_IP} grep -Fn two_factor /mnt/web-data/authelia/config/configuration.yml | sort | tail -n1)
|
||||||
twofacline=${twofacline%%:*}
|
twofacline=${twofacline%%:*}
|
||||||
|
autheliaconfig=$(ssh root@${NM_AUTHELIA_IP} cat ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled
|
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/block-exploits.conf' ${sitefile})" != "" ] && explt='' || explt='Yes'
|
||||||
# [ "$(grep '\#include conf.d/include/secure-access.conf' ${sitefile})" != "" ] && lock='' || lock='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%%:*}
|
sitefacline=${sitefacline%%:*}
|
||||||
if [ "${sitefacline}" == "" ]; then
|
if [ "${sitefacline}" == "" ]; then
|
||||||
lock='error'
|
lock='error'
|
||||||
|
|||||||
Reference in New Issue
Block a user