summaryrefslogtreecommitdiff
path: root/etc/init.d/uanytun
diff options
context:
space:
mode:
Diffstat (limited to 'etc/init.d/uanytun')
-rwxr-xr-xetc/init.d/uanytun14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/init.d/uanytun b/etc/init.d/uanytun
index f540975..9c2414a 100755
--- a/etc/init.d/uanytun
+++ b/etc/init.d/uanytun
@@ -33,7 +33,7 @@ start_vpn () {
fi
test -d $VARRUN_DIR || mkdir -p $VARRUN_DIR
DAEMONARG=`sed 's/#.*//' < $CONFIG_DIR/$VPNNAME/config | grep -e '\w' | sed 's/^/--/' | tr '\n' ' '`
- $DAEMON --write-pid $VARRUN_DIR/$NAME.$VPNNAME.pid $POSTUP $DAEMONOPTS $DAEMONARG || STATUS="FAILED"
+ $DAEMON --write-pid $VARRUN_DIR/$VPNNAME.pid $POSTUP $DAEMONOPTS $DAEMONARG || STATUS="FAILED"
else
STATUS="no config found"
fi
@@ -71,7 +71,7 @@ case "$1" in
stop)
echo -n "Stoping $DESC:"
if test -z "$2" ; then
- for PIDFILE in `ls $VARRUN_DIR/$NAME.*.pid 2> /dev/null`; do
+ for PIDFILE in `ls $VARRUN_DIR/*.pid 2> /dev/null`; do
VPNNAME=`basename $PIDFILE .pid`
echo -n " $VPNNAME"
stop_vpn
@@ -79,8 +79,8 @@ case "$1" in
else
while shift ; do
[ -z "$1" ] && break
- if test -e $VARRUN_DIR/$NAME.$1.pid ; then
- PIDFILE=`ls $VARRUN_DIR/$NAME.$1.pid 2> /dev/null`
+ if test -e $VARRUN_DIR/$1.pid ; then
+ PIDFILE=`ls $VARRUN_DIR/$1.pid 2> /dev/null`
VPNNAME=`basename $PIDFILE .pid`
echo -n " $VPNNAME"
stop_vpn
@@ -94,7 +94,7 @@ case "$1" in
reload)
echo -n "Reloading $DESC:"
if test -z "$2" ; then
- for PIDFILE in `ls $VARRUN_DIR/$NAME.*.pid 2> /dev/null`; do
+ for PIDFILE in `ls $VARRUN_DIR/*.pid 2> /dev/null`; do
VPNNAME=`basename $PIDFILE .pid`
echo -n " $VPNNAME"
stop_vpn
@@ -103,8 +103,8 @@ case "$1" in
else
while shift ; do
[ -z "$1" ] && break
- if test -e $VARRUN_DIR/$NAME.$1.pid ; then
- PIDFILE=`ls $VARRUN_DIR/$NAME.$1.pid 2> /dev/null`
+ if test -e $VARRUN_DIR/$1.pid ; then
+ PIDFILE=`ls $VARRUN_DIR/$1.pid 2> /dev/null`
VPNNAME=`basename $PIDFILE .pid`
echo -n " $VPNNAME"
stop_vpn