Update vpnmon.sh

This commit is contained in:
2024-10-09 08:28:50 -05:00
parent 664b6208eb
commit af20930c4c

View File

@@ -23,8 +23,8 @@ START(){
OUT=$(ip link | grep "${VPN_INTERFACE}")
if [ ${#OUT} -ne 0 ]; then
[ "${ROUTE_SUBNET1}" != "" ] && ip route add ${ROUTE_SUBNET1} via $(ip address show dev ppp0 | grep -Po '(?<=peer )(\b([0-9]{1,3}\.){3}[0-9]{1,3}\b)') dev ppp0
[ "${ROUTE_SUBNET2}" != "" ] && ip route add ${ROUTE_SUBNET2} via $(ip address show dev ppp0 | grep -Po '(?<=peer )(\b([0-9]{1,3}\.){3}[0-9]{1,3}\b)') dev ppp0
[ "${ROUTE_SUBNET1}" != "" ] && ip route add ${ROUTE_SUBNET1} via $(ip address show dev ${VPN_INTERFACE} | grep -Po '(?<=peer )(\b([0-9]{1,3}\.){3}[0-9]{1,3}\b)') dev ${VPN_INTERFACE}
[ "${ROUTE_SUBNET2}" != "" ] && ip route add ${ROUTE_SUBNET2} via $(ip address show dev ${VPN_INTERFACE} | grep -Po '(?<=peer )(\b([0-9]{1,3}\.){3}[0-9]{1,3}\b)') dev ${VPN_INTERFACE}
# if [ "${SYSTEM}" = "unifipoller" ]; then
# /usr/sbin/service unifi-poller start &