Update sites.inc
This commit is contained in:
@@ -581,19 +581,20 @@ SITEINFO(){
|
|||||||
# start=`date +%s`
|
# start=`date +%s`
|
||||||
dl=105
|
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
|
if [ "${1}" == "edit" ]; then
|
||||||
[ "${2}" == "" ] && echo -e "${idsCL[LightGreen]}Choose a site from the list below to edit: ${idsCL[Default]}"
|
[ "${2}" == "" ] && echo -e "${idsCL[LightGreen]}Choose a site from the list below to edit: ${idsCL[Default]}"
|
||||||
else
|
else
|
||||||
echo -e "${idsCL[LightGreen]}Local NGINX Sites ${idsCL[Default]}"
|
echo -e "${idsCL[LightGreen]}Local NGINX Sites ${idsCL[Default]}"
|
||||||
fi
|
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
|
|
||||||
|
|
||||||
gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled
|
gosite=${NM_NGINXPATH[${RUN_NODE_TYPE}]}/sites-enabled
|
||||||
declare -A SITELIST
|
declare -A SITELIST
|
||||||
if [ "${gosite}" != "" ]; then
|
if [ "${gosite}" != "" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user