osmocom-nitb debian package improvements.
* Don't enable MNCC sock by default. * Create important directories. * Fix init script 'stop' command.
This commit is contained in:
parent
6e7d137e79
commit
b561459dd6
|
@ -1,3 +1,11 @@
|
|||
openbsc (0.12.0+git26-5) precise; urgency=low
|
||||
|
||||
* Don't enable MNCC sock by default.
|
||||
* Automatically create important directories.
|
||||
* Fix init script 'stop' command.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Fri, 24 Aug 2012 20:56:33 -0700
|
||||
|
||||
openbsc (0.12.0+git26-4) precise; urgency=low
|
||||
|
||||
* Specify HLR path and enable RTP proxy.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
CONFIG_FILE="/etc/osmocom/osmo-nitb.cfg"
|
||||
HLR_FILE="/var/lib/osmocom/hlr.sqlite3"
|
||||
DAEMON_ARGS="-m -P"
|
||||
|
||||
DAEMON_ARGS="-P"
|
||||
|
||||
# Uncomment if using LCR+Asterisk
|
||||
# DAEMON_ARGS="-m -P"
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/etc/osmocom
|
||||
/var/log/osmocom
|
||||
/var/lib/osmocom
|
|
@ -15,17 +15,16 @@
|
|||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
DESC=osmo-nitb # Introduce a short description here
|
||||
NAME=osmocom-nitb # Introduce the short server's name here
|
||||
DAEMON=/usr/bin/osmo-nitb # Introduce the server's location here
|
||||
PIDFILE=/var/run/$NAME.pid
|
||||
SCRIPTNAME=/etc/init.d/$NAME
|
||||
NAME=osmo-nitb # Introduce the short server's name here
|
||||
DESC="Osmocom GSM Network-in-a-Box" # Introduce a short description here
|
||||
DAEMON=/usr/bin/osmo-nitb # Introduce the server's location here
|
||||
SCRIPTNAME=/etc/init.d/osmocom-nitb
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
|
||||
[ -r /etc/default/osmocom-nitb ] && . /etc/default/osmocom-nitb
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
@ -45,9 +44,9 @@ do_start()
|
|||
# 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 --test > /dev/null \
|
||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
|
@ -65,7 +64,7 @@ do_stop()
|
|||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
|
@ -76,8 +75,6 @@ do_stop()
|
|||
# sleep for some time.
|
||||
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
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
|
@ -90,7 +87,7 @@ do_reload() {
|
|||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
|
||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue