diff options
author | Bian Jiaping | 2017-04-29 17:30:23 +0800 |
---|---|---|
committer | Bian Jiaping | 2017-04-29 17:30:23 +0800 |
commit | f392909a2d3e1bf2df22e659a87462e89f0aeeb6 (patch) | |
tree | 07e01d658b34bb0ca697289c877c61148c02742f /ip-pre-up.sh | |
download | aur-china-ip-skip-vpn.tar.gz |
Initialize
Diffstat (limited to 'ip-pre-up.sh')
-rwxr-xr-x | ip-pre-up.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ip-pre-up.sh b/ip-pre-up.sh new file mode 100755 index 000000000000..4f632e56c069 --- /dev/null +++ b/ip-pre-up.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +OLD_GATEWAY=`ip route show | grep '^default' | sed -e 's/default via \([^ ]*\).*/\1/'` + +if [[ -n $OLD_GATEWAY ]]; then + echo $OLD_GATEWAY > /run/vpn-old-gateway + chmod 644 /run/vpn-old-gateway +fi |