Update sites.inc

This commit is contained in:
2023-11-12 12:33:36 -06:00
parent ae89970be2
commit 4e2757e31a

View File

@@ -581,19 +581,20 @@ SITEINFO(){
# start=`date +%s`
dl=105
if [ "${onefacline}" == "" ]; then
if [ "$($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)" != "${NM_AUTHELIA_IP}" ] && ACMD="ssh root@${NM_AUTHELIA_IP}" || ACMD=""
autheliaconfig=$(${ACMD} cat ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml)
onefacline=$(echo "${autheliaconfig}" | grep -Fn one_factor | sort | tail -n1)
onefacline=${onefacline%%:*}
twofacline=$(echo "${autheliaconfig}" | grep -Fn two_factor | sort | tail -n1)
twofacline=${twofacline%%:*}
fi
if [ "${1}" == "edit" ]; then
[ "${2}" == "" ] && echo -e "${idsCL[LightGreen]}Choose a site from the list below to edit: ${idsCL[Default]}"
else
echo -e "${idsCL[LightGreen]}Local NGINX Sites ${idsCL[Default]}"
fi
if [ "${onefacline}" == "" ]; then
onefacline=$(ssh root@${NM_AUTHELIA_IP} grep -Fn one_factor /mnt/web-data/authelia/config/configuration.yml | sort | tail -n1)
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
fi
gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled
declare -A SITELIST
if [ "${gosite}" != "" ]; then