diff --git a/nodemgmt-scripts.sh b/nodemgmt-scripts.sh index 2dcfd3b8..94636acc 100755 --- a/nodemgmt-scripts.sh +++ b/nodemgmt-scripts.sh @@ -31,6 +31,7 @@ OFFSITE_STATICROUTE_FIX(){ if [ "$(CHECK_HOST_QC 10.5.0.1)" != "false" ]; then STSVPN_ADAPTER=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r | grep '10.5.0.0/20' | awk '{print $7}') if [ "$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r | grep 10.10.0.0)" = "" ] && [ "${STSVPN_ADAPTER}" != "" ]; then + RUN=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r add 10.6.1.0/24 dev ${STSVPN_ADAPTER} 2>&1 >/dev/null) RUN=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${NM_OFFSITE_GW_IP} ip r add 10.10.0.0/16 dev ${STSVPN_ADAPTER} 2>&1 >/dev/null) if [ "${RUN}" == "" ]; then SENDNOTICE "Static Route to Homesite Missing" "Re-added the static route onto the Offsite UniFi Gateway"