This commit is contained in:
2023-10-18 08:58:41 -05:00
parent 5cfcccdc05
commit 94a4bfe599
2 changed files with 6 additions and 2 deletions

View File

@@ -304,7 +304,11 @@ SERVICE(){
NOGOCHK=true;
# if [ "${1}" == "gitea" ] || [ "${1}" == "pdnsadmin" ] || [ "${1}" == "pdnsadmin.socket" ]; 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) != *10.10.1.120* ]]; 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['WEB']}* ]]; 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
NOGOCHK=false;
fi
fi