2011-11-11 13:26:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
|
|
# Provides: osmo-bsc
|
|
|
|
# Required-Start: $syslog $networking
|
|
|
|
# Required-Stop: $syslog
|
|
|
|
# Default-Start: 5
|
|
|
|
# Default-Stop: 1
|
|
|
|
# Short-Description: Osmocom GSM Base Station Controller
|
|
|
|
### END INIT INFO
|
|
|
|
|
|
|
|
DAEMON=/usr/bin/osmo-bsc
|
|
|
|
NAME=osmo-bsc
|
|
|
|
DESC="Osmocom GSM Base Station Controller"
|
2014-02-14 16:42:38 +00:00
|
|
|
NORMAL_ARGS="-D -c /etc/osmocom/osmo-bsc.cfg -r /var/run/openbsc.ctl"
|
2011-11-11 13:26:06 +00:00
|
|
|
|
|
|
|
OSMOBTS_EXTRA_ARGS=""
|
|
|
|
NO_START=1
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
test ! -r /etc/default/osmo-bsc || . /etc/default/osmo-bsc
|
|
|
|
test "$NO_START" = "0" || exit 0
|
|
|
|
test -x "$DAEMON" || exit 0
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
echo -n "Starting $DESC: "
|
|
|
|
start-stop-daemon -S \
|
|
|
|
-x "$DAEMON" -- $NORMAL_ARGS $OSMOBTS_EXTRA_ARGS
|
|
|
|
echo "$NAME."
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
echo -n "Stopping $DESC: "
|
|
|
|
start-stop-daemon -K -x "$DAEMON"
|
|
|
|
echo "$NAME."
|
|
|
|
;;
|
2012-09-15 14:34:21 +00:00
|
|
|
restart)
|
|
|
|
$0 stop
|
|
|
|
$0 start
|
2011-11-11 13:26:06 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
N=/etc/init.d/$NAME
|
2012-09-15 14:34:21 +00:00
|
|
|
echo "Usage: $N {start|stop|restart}" >&2
|
2011-11-11 13:26:06 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|