From f3fbf2a39eb1d6443694ad4032463a5ba948b31a Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Wed, 24 Nov 2010 14:55:41 +0300 Subject: [PATCH] Update OpenBTS init script --- public-trunk/init/OpenBTS | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public-trunk/init/OpenBTS b/public-trunk/init/OpenBTS index d091316..b086535 100755 --- a/public-trunk/init/OpenBTS +++ b/public-trunk/init/OpenBTS @@ -45,13 +45,14 @@ SCRIPTNAME=/etc/init.d/$NAME # do_start() { +# test -d ${XL2TPD_RUN_DIR:-/var/run/xl2tpd} || mkdir -p ${XL2TPD_RUN_DIR:-/var/run/xl2tpd} # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --make-pidfile --background --test > /dev/null \ + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --make-pidfile --background -- $DAEMON_ARGS \ + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \ || return 2 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend @@ -80,7 +81,8 @@ do_stop() start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE + # But we do. +# rm -f $PIDFILE return "$RETVAL" }