1 --- /etc/init.d/openvpn 2004-05-12 20:30:06.000000000 +0200
2 +++ openvpn 2004-05-12 20:34:33.000000000 +0200
4 # returning success or failure status to caller (James Yonan).
6 # Location of openvpn binary
7 -openvpn="/usr/sbin/openvpn"
8 +openvpn=/usr/sbin/openvpn
11 -lock="/var/lock/subsys/openvpn"
12 +lock=/var/lock/subsys/openvpn
15 -piddir="/var/run/openvpn"
16 +piddir=/var/run/openvpn
18 # Our working directory
23 # we were not shut down correctly
24 - for pidf in `/bin/ls $piddir/*.pid $piddir/*/*.pid 2>/dev/null`; do
25 + for pidf in `find $piddir -name "*.pid" 2>/dev/null`; do
27 kill `cat $pidf` >/dev/null 2>&1
33 - rm -f $piddir/*.pid $piddir/*/*.pid
34 + find $piddir -name "*.pid"|xargs rm -f
36 # Start every .conf in $work and run .sh if exists
39 - for c in `/bin/ls *.conf */*.conf 2>/dev/null`; do
40 + for c in `find * -name "*.conf" 2>/dev/null`; do
42 if [ -f "$bn.sh" ]; then
47 echo -n $"Shutting down openvpn: "
48 - for pidf in `/bin/ls $piddir/*.pid $piddir/*/*.pid 2>/dev/null`; do
49 + for pidf in `find $piddir -name "*.pid" 2>/dev/null`; do
51 kill `cat $pidf` >/dev/null 2>&1
57 - for pidf in `/bin/ls $piddir/*.pid $piddir/*/*.pid 2>/dev/null`; do
58 + for pidf in `find $piddir -name "*.pid" 2>/dev/null`; do
60 kill -HUP `cat $pidf` >/dev/null 2>&1
66 - for pidf in `/bin/ls $piddir/*.pid $piddir/*/*.pid 2>/dev/null`; do
67 + for pidf in `find $piddir -name "*.pid" 2>/dev/null`; do
69 kill -USR1 `cat $pidf` >/dev/null 2>&1
75 - for pidf in `/bin/ls $piddir/*.pid $piddir/*/*.pid 2>/dev/null`; do
76 + for pidf in `find $piddir -name "*.pid" 2>/dev/null`; do
78 kill -USR2 `cat $pidf` >/dev/null 2>&1