Update sites.inc
This commit is contained in:
@@ -375,14 +375,12 @@ NEWSITE(){
|
|||||||
[ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS=""
|
[ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS=""
|
||||||
if [[ "${SECURE}" = *"FA"* ]] && [ "${NM_DOCKER_COMPOSE_LOC['authelia']}" != "" ]; then
|
if [[ "${SECURE}" = *"FA"* ]] && [ "${NM_DOCKER_COMPOSE_LOC['authelia']}" != "" ]; then
|
||||||
echo -e "${idsCL[LightGreen]}Configuring Authelia SSO for '${idsCL[Yellow]}${MAIN_SITE}${idsCL[LightGreen]}' {${NGINX_SERVERNAME}}...${idsCL[Default]}"
|
echo -e "${idsCL[LightGreen]}Configuring Authelia SSO for '${idsCL[Yellow]}${MAIN_SITE}${idsCL[LightGreen]}' {${NGINX_SERVERNAME}}...${idsCL[Default]}"
|
||||||
SECURE="include conf.d\/include\/secure-access.conf;"
|
|
||||||
for NTYPE in "${NM_NODE_TYPES[@]}"; do
|
for NTYPE in "${NM_NODE_TYPES[@]}"; do
|
||||||
if [[ "${NM_DOCKERS_CHECK[${NTYPE}]}" == *"authelia"* ]]; then
|
if [[ "${NM_DOCKERS_CHECK[${NTYPE}]}" == *"authelia"* ]]; then
|
||||||
NM_AUTHELIA_IP=${NM_SINGLESRVR_IP[${NTYPE}]}
|
NM_AUTHELIA_IP=${NM_SINGLESRVR_IP[${NTYPE}]}
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "HERE: ${SECURE}"
|
|
||||||
if [ "${SECURE}" == "2FA" ]; then
|
if [ "${SECURE}" == "2FA" ]; then
|
||||||
ssh root@${NM_AUTHELIA_IP} "sed -ie \"/domain: # Proxies needing 2 factor below/a ~~~ - \\\"${MAIN_SITE}\\\"\" ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml"
|
ssh root@${NM_AUTHELIA_IP} "sed -ie \"/domain: # Proxies needing 2 factor below/a ~~~ - \\\"${MAIN_SITE}\\\"\" ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml"
|
||||||
else
|
else
|
||||||
@@ -391,6 +389,7 @@ NEWSITE(){
|
|||||||
ssh root@${NM_AUTHELIA_IP} "sed -i \"s/~~~/ /g\" ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml"
|
ssh root@${NM_AUTHELIA_IP} "sed -i \"s/~~~/ /g\" ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml"
|
||||||
ssh root@${NM_AUTHELIA_IP} "/usr/bin/docker restart authelia >/dev/null 2>&1"
|
ssh root@${NM_AUTHELIA_IP} "/usr/bin/docker restart authelia >/dev/null 2>&1"
|
||||||
|
|
||||||
|
SECURE="include conf.d\/include\/secure-access.conf;"
|
||||||
else
|
else
|
||||||
SECURE=""
|
SECURE=""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user