Uploaded initial version.
[guivpn] / trunk / vpngui / src / vpngui-helper
1 #!/bin/sh
2 # Vpnc helper script for maemo
3
4 if [ "$1" = "connect" ]; then
5         shift # need to remove "connect" from getting passed to vpnc
6         CMD="/usr/sbin/vpnc $*"
7         exec $CMD 
8
9 elif [ "$1" = "disconnect" ]; then
10         # vpngui knows our pid..
11         kill -TERM $2 > /dev/null 2>&1
12         # In case that didn't work...
13         killall vpnc > /dev/null 2>&1
14         # ..and pretend everything went fine
15
16         exit 0
17
18 elif [ "$1" = "reconnect" ]; then
19         # vpngui knows our pid..
20         kill -USR1 $2 > /dev/null 2>&1
21         exit 0
22
23 else
24         exit 1
25 fi
26
27 # vim:ts=4