update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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 '
|
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'
|
CERT_DAEMON='/snap/bin/certbot'
|
||||||
|
|||||||
@@ -307,11 +307,11 @@ SERVICE(){
|
|||||||
|
|
||||||
NOGOCHK=true;
|
NOGOCHK=true;
|
||||||
if [ "${1}" == "gitea" ]; then
|
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;
|
NOGOCHK=false;
|
||||||
fi
|
fi
|
||||||
elif [ "${1}" == "headscale" ]; then
|
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;
|
NOGOCHK=false;
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ SITEINFO(){
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ "${onefacline}" == "" ]; then
|
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)
|
autheliaconfig=$(${ACMD} cat ${NM_DOCKER_COMPOSE_LOC['authelia']}/config/configuration.yml)
|
||||||
onefacline=$(echo "${autheliaconfig}" | grep -Fn one_factor | sort | tail -n1)
|
onefacline=$(echo "${autheliaconfig}" | grep -Fn one_factor | sort | tail -n1)
|
||||||
onefacline=${onefacline%%:*}
|
onefacline=${onefacline%%:*}
|
||||||
|
|||||||
@@ -204,8 +204,8 @@ STATUS(){
|
|||||||
[ "${NTYPE}" != "OFW" ] && srvctst=(`${NCMD} "systemctl is-active ${srvcstotest}"`)
|
[ "${NTYPE}" != "OFW" ] && srvctst=(`${NCMD} "systemctl is-active ${srvcstotest}"`)
|
||||||
sr=0
|
sr=0
|
||||||
for srvc in "${!srvcs}"; do
|
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}" == "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" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) != *${NM_SINGLESRVR_IP['HS']}* ]] && NOGOCHK=false
|
[ "${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
|
[ "${srvc}" == "keepalived" ] && ([ "${nip}" == "10.2.1.2" ] || [ "${nip}" == "10.2.1.51" ]) && NOGOCHK=false
|
||||||
if [ ${NOGOCHK} == true ]; then
|
if [ ${NOGOCHK} == true ]; then
|
||||||
if [ "${ST_ACTION}" != "check" ]; then
|
if [ "${ST_ACTION}" != "check" ]; then
|
||||||
@@ -276,9 +276,6 @@ STATUS(){
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# for srvc in "${!var2}"; do
|
# for srvc in "${!var2}"; do
|
||||||
# NOGOCHK=true;
|
# 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;
|
# [ "${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;
|
||||||
|
|||||||
Reference in New Issue
Block a user