This commit is contained in:
2023-11-16 08:37:08 -06:00
parent 523b248445
commit a723c9eba3
4 changed files with 6 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERS='4.14.21-11162023'
VERS='4.14.23-11162023'
noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update '
CERT_DAEMON='/snap/bin/certbot'

View File

@@ -307,11 +307,11 @@ SERVICE(){
NOGOCHK=true;
if [ "${1}" == "gitea" ]; then
if [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) != *$(GET_AUTHELIA_IP)* ]]; then
if [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) != *$(GET_AUTHELIA_IP)* ]]; then
NOGOCHK=false;
fi
elif [ "${1}" == "headscale" ]; then
if [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['HS']}* ]]; then
if [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['HS']}* ]]; then
NOGOCHK=false;
fi
fi

View File

@@ -546,7 +546,7 @@ SITEINFO(){
done
if [ "${onefacline}" == "" ]; then
[ "$(${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=""
[ "$(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | 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%%:*}

View File

@@ -204,8 +204,8 @@ STATUS(){
[ "${NTYPE}" != "OFW" ] && srvctst=(`${NCMD} "systemctl is-active ${srvcstotest}"`)
sr=0
for srvc in "${!srvcs}"; do
[ "${srvc}" == "gitea" ] && [ "${NTYPE}" == "WEB" ] && [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['WEB']}* ]] && NOGOCHK=false || NOGOCHK=true
[ "${srvc}" == "headscale" ] && [ "${NTYPE}" == "HS" ] && [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['HS']}* ]] && NOGOCHK=false
[ "${srvc}" == "gitea" ] && [ "${NTYPE}" == "WEB" ] && [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['WEB']}* ]] && NOGOCHK=false || NOGOCHK=true
[ "${srvc}" == "headscale" ] && [ "${NTYPE}" == "HS" ] && [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['HS']}* ]] && NOGOCHK=false
[ "${srvc}" == "keepalived" ] && ([ "${nip}" == "10.2.1.2" ] || [ "${nip}" == "10.2.1.51" ]) && NOGOCHK=false
if [ ${NOGOCHK} == true ]; then
if [ "${ST_ACTION}" != "check" ]; then
@@ -276,9 +276,6 @@ STATUS(){
done
# for srvc in "${!var2}"; do
# NOGOCHK=true;
# [ "${srvc}" == "gitea" ] && [ "${NTYPE}" == "WEB" ] && [[ $(${NCMD} ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${WEB_HOSTS[0]}* ]] && NOGOCHK=false;