summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/sbin/ovpn-linkup6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/sbin/ovpn-linkup b/usr/local/sbin/ovpn-linkup
index 60489c2..613822c 100755
--- a/usr/local/sbin/ovpn-linkup
+++ b/usr/local/sbin/ovpn-linkup
@@ -2,7 +2,11 @@
# let the configuration system know that the ip has changed.
#/usr/local/sbin/pfSctl -c "interface newip $interface"
-/bin/echo $4 > /tmp/$1_router
+if [ -n $route_vpn_gateway ]; then
+ /bin/echo $route_vpn_gateway > /tmp/$1_router
+else
+ /bin/echo $4 > /tmp/$1_router
+fi
/usr/bin/touch /tmp/$1up
# reload filter
/usr/local/sbin/pfSctl -c "interface newip $1"
OpenPOWER on IntegriCloud