Print a warning if an illegal value is used for the spi but continue
[vpnc.git] / vpnc-disconnect
blob53fe12927e1c855d21a744d8f0c4531b0fbae031
1 #!/bin/sh
3 pid=/var/run/vpnc.pid
5 if [ $# -ne 0 ]; then
6 echo "Usage: $0" 1>&2
7 exit 1
8 fi
10 PID="$(cat "$pid" 2> /dev/null)"
12 if [ -z "$PID" ]; then
13 echo "no vpnc found running"
14 exit 1
17 if ! kill -0 "$PID" > /dev/null 2>&1; then
18 echo "no vpnc found running"
19 exit 1
22 echo "Terminating vpnc daemon (pid: $PID)"
23 exec kill $PID