From a723c9eba325c6e9ccc98a29ffb33098d5749fab Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 16 Nov 2023 08:37:08 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- inc/services.inc | 4 ++-- inc/sites.inc | 2 +- inc/status.inc | 7 ++----- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/defaults.inc b/defaults.inc index c39fb2ea..9756f88c 100755 --- a/defaults.inc +++ b/defaults.inc @@ -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' diff --git a/inc/services.inc b/inc/services.inc index 92048938..8c85dbb7 100755 --- a/inc/services.inc +++ b/inc/services.inc @@ -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 diff --git a/inc/sites.inc b/inc/sites.inc index 09b4aa4b..83826694 100755 --- a/inc/sites.inc +++ b/inc/sites.inc @@ -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%%:*} diff --git a/inc/status.inc b/inc/status.inc index c6e96c98..f3ed2c07 100755 --- a/inc/status.inc +++ b/inc/status.inc @@ -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;