repo.or.cz
/
vpnc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
terminate config reading on EOT/Ctl-D instead of just on pipe close
[vpnc.git]
/
vpnc-disconnect
blob
53fe12927e1c855d21a744d8f0c4531b0fbae031
1
#!/bin/sh
2
3
pid
=/
var
/
run
/
vpnc.pid
4
5
if
[
$#
-ne
0
];
then
6
echo
"Usage:
$0
"
1
>&
2
7
exit
1
8
fi
9
10
PID
=
"$(cat "
$pid
" 2> /dev/null)"
11
12
if
[
-z
"
$PID
"
];
then
13
echo
"no vpnc found running"
14
exit
1
15
fi
16
17
if
!
kill -0
"
$PID
"
> /
dev
/
null
2
>&
1
;
then
18
echo
"no vpnc found running"
19
exit
1
20
fi
21
22
echo
"Terminating vpnc daemon (pid:
$PID
)"
23
exec kill
$PID