laforge
/
openbts-osmo
Archived
1
0
Fork 0

Update OpenBTS init script

This commit is contained in:
Alexander Chemeris 2010-11-24 14:55:41 +03:00 committed by Thomas Tsou
parent fc61ebaf53
commit f3fbf2a39e
1 changed files with 5 additions and 3 deletions

View File

@ -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"
}