This commit is contained in:
2023-11-15 22:18:05 -06:00
parent 7ec8040b1f
commit 8c5b2227a3
6 changed files with 36 additions and 51 deletions

View File

@@ -546,7 +546,7 @@ SITEINFO(){
done
if [ "${onefacline}" == "" ]; then
[ "$($NCMD /sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1 | head -n1)" != "${NM_AUTHELIA_IP}" ] && ACMD="ssh root@${NM_AUTHELIA_IP}" || ACMD=""
[ "$($NCMD ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | 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%%:*}