diff options
author | Oleksandr Natalenko | 2015-06-08 13:01:56 +0300 |
---|---|---|
committer | Oleksandr Natalenko | 2015-06-08 13:01:56 +0300 |
commit | 85e54864f19f49ccb34c0079407c6dab38311ac1 (patch) | |
tree | c76bf494444604a912b2102d19fefb3af60eaf83 /vpnc | |
download | aur-85e54864f19f49ccb34c0079407c6dab38311ac1.tar.gz |
initial import
Diffstat (limited to 'vpnc')
-rw-r--r-- | vpnc | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +#! /bin/bash + +vpnc_up() { + VpncConfig="${VpncConfig:-/etc/vpnc/default.conf}" + VpncFlags="${VpncFlags:-}" + + if ! /usr/bin/vpnc $VpncFlags "$VpncConfig"; then + report_error "Establishing vpnc connection failed." + return 1 + fi +} + +vpnc_down() { + if ! /usr/bin/vpnc-disconnect; then + report_error "Could not disconnect vpnc connection. Trying to kill process." + if ! pkill -9 -x vpnc &>/dev/null; then + report_error "Unable to terminate or find vpnc process." + fi + return 1 + fi +} |