summaryrefslogtreecommitdiff
path: root/etc/init.d
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2010-01-24 17:00:51 +0000
committerChristian Pointner <equinox@anytun.org>2010-01-24 17:00:51 +0000
commita2b11d187b7f610c7092a335155554641bfa2031 (patch)
treeddd28781825e68444ce3a888738c8299fd67e8d4 /etc/init.d
parentcleaned up initscript (diff)
cleaned up initscript
Diffstat (limited to 'etc/init.d')
-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