summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2013-11-27 14:24:12 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2013-11-27 14:24:12 +0100
commit1b8e75371bb0c122880f990b16057fc0bd62374a (patch)
treeb7e83db947857f5ae93fa6ff6f41016641e2ac26
parentb8361d9d4938a2aced0f35c66244d483fcfa1da9 (diff)
Fix init script for new pid/status filenames
-rw-r--r--debian/openvpn.init.d10
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/openvpn.init.d b/debian/openvpn.init.d
index 2f6a018..e465c85 100644
--- a/debian/openvpn.init.d
+++ b/debian/openvpn.init.d
@@ -155,7 +155,7 @@ stop)
if test -z "$2" ; then
for PIDFILE in `ls /run/openvpn/*.pid 2> /dev/null`; do
- NAME=`echo $PIDFILE | cut -c18-`
+ NAME=`echo $PIDFILE | cut -c14-`
NAME=${NAME%%.pid}
stop_vpn
log_progress_msg "$NAME"
@@ -165,7 +165,7 @@ stop)
[ -z "$1" ] && break
if test -e /run/openvpn/$1.pid ; then
PIDFILE=`ls /run/openvpn/$1.pid 2> /dev/null`
- NAME=`echo $PIDFILE | cut -c18-`
+ NAME=`echo $PIDFILE | cut -c14-`
NAME=${NAME%%.pid}
stop_vpn
log_progress_msg "$NAME"
@@ -180,7 +180,7 @@ stop)
reload|force-reload)
log_daemon_msg "Reloading $DESC"
for PIDFILE in `ls /run/openvpn/*.pid 2> /dev/null`; do
- NAME=`echo $PIDFILE | cut -c18-`
+ NAME=`echo $PIDFILE | cut -c14-`
NAME=${NAME%%.pid}
# If openvpn if running under a different user than root we'll need to restart
if egrep '^[[:blank:]]*user[[:blank:]]' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
@@ -199,7 +199,7 @@ reload|force-reload)
soft-restart)
log_daemon_msg "$DESC sending SIGUSR1"
for PIDFILE in `ls /run/openvpn/*.pid 2> /dev/null`; do
- NAME=`echo $PIDFILE | cut -c18-`
+ NAME=`echo $PIDFILE | cut -c14-`
NAME=${NAME%%.pid}
kill -USR1 `cat $PIDFILE` || true
log_progress_msg "$NAME"
@@ -215,7 +215,7 @@ restart)
cond-restart)
log_daemon_msg "Restarting $DESC."
for PIDFILE in `ls /run/openvpn/*.pid 2> /dev/null`; do
- NAME=`echo $PIDFILE | cut -c18-`
+ NAME=`echo $PIDFILE | cut -c14-`
NAME=${NAME%%.pid}
stop_vpn
start_vpn