summaryrefslogtreecommitdiffstats
path: root/usr/local/sbin/ovpn-linkup
blob: 2f3246e8e61d48c30442894553bd926aca954995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# let the configuration system know that the ip has changed.
#/usr/local/sbin/pfSctl -c "interface newip $interface"

if [ "${dev_type}" = "tun" ]; then
	if [ "" != "$route_vpn_gateway" ]; then
		/bin/echo $route_vpn_gateway > /tmp/$1_router
	else
		/bin/echo $5 > /tmp/$1_router
	fi
fi

/usr/bin/touch /tmp/$1up
# reload filter 
/usr/local/sbin/pfSctl -c "interface newip $1"
exit 0
OpenPOWER on IntegriCloud