blob: 502dc6b2b1820ce48d4a84ed4a6c7e40041449db (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/bin/sh
INTERFACE="${1}"
STATUS="${2}"
# VPN interfaces managed by networkmanager send events vpn-{up,down}.
# If the connection is started by whatever networkmanager sees this
# and triggers event up or down. Ignore these.
if ! ip tuntap | grep -q "^${INTERFACE}:"; then
exit 0
fi
if [ "${STATUS}" == "up" ]; then
if pgrep -x openvpn >/dev/null; then
kill -USR1 $(pgrep -x openvpn)
fi
fi
|