kyleupgrade

This commit is contained in:
2023-11-10 23:35:18 -06:00
parent 6bd941a802
commit 2c07fed019
2 changed files with 23 additions and 7 deletions

View File

@@ -361,13 +361,18 @@ NEWSITE(){
[ "${WEBSOCKET}" == "yes" ] && WEBSOCKET="include conf.d\/include\/websocket-support.conf;" || WEBSOCKET=""
[ "${HSTS}" == "yes" ] && HSTS="include conf.d\/include\/hsts-support.conf;" || HSTS=""
[ "${EXPLOITS}" == "yes" ] && EXPLOITS="include conf.d\/include\/block-exploits.conf;" || EXPLOITS=""
if [ "${SECURE}" == "yes" ]; then
if [ "${SECURE}" == "yes" ] && [ "${NM_DOCKER_COMPOSE_LOC['authelia']}" != "" ]; then
SECURE="include conf.d\/include\/secure-access.conf;"
for NTYPE in "${NM_NODE_TYPES[@]}"; do
if [[ "${NM_DOCKERS_CHECK[${NTYPE}]}" == *"authelia"* ]]; then
NM_AUTHELIA_IP=${NM_SINGLESRVR_IP[${NTYPE}]}
break
fi
done
ssh root@${NM_AUTHELIA_IP} "sed -ie \"/domain: # Proxies only requiring username and password/a ~~~ - \\\"${MAIN_SITE}\\\"\" ${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_SINGLESRVR_IP['WEB']} "sed -ie \"/domain: # Proxies only requiring username and password/a ~~~ - \\\"${MAIN_SITE}\\\"\" ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml"
ssh root@${NM_SINGLESRVR_IP['WEB']} "sed -i \"s/~~~/ /g\" ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml"
ssh root@${NM_SINGLESRVR_IP['WEB']} "/usr/bin/docker restart authelia"
ssh root@${NM_AUTHELIA_IP} "/usr/bin/docker restart authelia"
else
SECURE=""