This commit is contained in:
2024-04-24 11:39:43 -05:00
parent 08f41866d1
commit f279269be8
2 changed files with 6 additions and 5 deletions

View File

@@ -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 '

View File

@@ -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
}