Update vpnmon.sh
This commit is contained in:
@@ -23,8 +23,8 @@ START(){
|
|||||||
OUT=$(ip link | grep "${VPN_INTERFACE}")
|
OUT=$(ip link | grep "${VPN_INTERFACE}")
|
||||||
if [ ${#OUT} -ne 0 ]; then
|
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_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 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 ${VPN_INTERFACE} | grep -Po '(?<=peer )(\b([0-9]{1,3}\.){3}[0-9]{1,3}\b)') dev ${VPN_INTERFACE}
|
||||||
|
|
||||||
# if [ "${SYSTEM}" = "unifipoller" ]; then
|
# if [ "${SYSTEM}" = "unifipoller" ]; then
|
||||||
# /usr/sbin/service unifi-poller start &
|
# /usr/sbin/service unifi-poller start &
|
||||||
|
|||||||
Reference in New Issue
Block a user