diff --git a/defaults.inc b/defaults.inc index 6817410a..ccd9c08a 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS='5.1.104-04102024' +VERS='5.1.105-04242024' NM_BETA=false noheader=' service status-check nightlyrephp7.3-fpm,new backup report check checkcerts gitea update-nodes copynpmcerts singleservercheck update-dyndns backup-offsitepfsense gui nightlyreview update log betacheck offsite-staticroute-fix ' diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index d09ff7f0..51e04ba8 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -25,10 +25,11 @@ fi [ -f ${NM_BACKUP_FOLDER}/templates/*.config ] && rm -f ${NM_BACKUP_FOLDER}/templates/*.config OFFSITE_STATICROUTE_FIX(){ - if [ "$(CHECK_HOST 10.10.0.1)" != "true" ] && [ "$(CHECK_HOST ${NM_OFFSITE_GW_IP})" != "false" ] && [ "$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r | grep 10.10.0.0)" = "" ]; then - routeinfo=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r | grep 10.10.0.0) - RUN=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r add 10.10.0.0/16 dev wgsts1000) - SENDNOTICE "Static Routen to Homesite Missing" "Re-added the static route onto the UniFi Gateway" + if [ "$(CHECK_HOST 10.10.0.1)" != "true" ]; then + if [ "$(CHECK_HOST ${NM_OFFSITE_GW_IP})" != "false" ] && [ "$(CHECK_HOST 10.5.0.1)" != "false" ] && [ "$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r | grep 10.10.0.0)" = "" ]; then + RUN=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r add 10.10.0.0/16 dev wgsts1000) + SENDNOTICE "Static Routen to Homesite Missing" "Re-added the static route onto the UniFi Gateway" + fi fi }