update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='5.1.105-04242024'
|
VERS='5.1.106-04242024'
|
||||||
NM_BETA=false
|
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 '
|
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 '
|
||||||
|
|||||||
@@ -26,10 +26,26 @@ fi
|
|||||||
|
|
||||||
OFFSITE_STATICROUTE_FIX(){
|
OFFSITE_STATICROUTE_FIX(){
|
||||||
if [ "$(CHECK_HOST 10.10.0.1)" != "true" ]; then
|
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
|
if [ "$(CHECK_HOST ${NM_OFFSITE_GW_IP})" != "false" ]; 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)
|
if [ "$(CHECK_HOST 10.5.0.1)" != "false" ]; then
|
||||||
SENDNOTICE "Static Route to Homesite Missing" "Re-added the static route onto the UniFi Gateway"
|
if [ "$(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 2>&1 >/dev/null)
|
||||||
|
if [ "${RUN}" == "" ]; then
|
||||||
|
SENDNOTICE "Static Route to Homesite Missing" "Re-added the static route onto the Offsite UniFi Gateway"
|
||||||
|
else
|
||||||
|
SENDNOTICE "ERROR: Static Route to Homesite Missing" "Cannot add the static route onto the Offsite UniFi Gateway" 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ ! -f ${NM_TMPFOLDER}/vpn-tunnel.down ]; then
|
||||||
|
touch ${NM_TMPFOLDER}/vpn-tunnel.down
|
||||||
|
elif [ $(expr `date +%s` - $(stat -c %Y ${NM_TMPFOLDER}/vpn-tunnel.down)) -ge 300 ]; then
|
||||||
|
SENDNOTICE "VPN to Homesite Down" "FiX'yO ShiTTy A$$ VPN"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
rm -f ${NM_TMPFOLDER}/vpn-tunnel*
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user