blob: 6369bbfe6d8e33acd8e03cac9c7bfc6638a71b58 [file] [log] [blame]
Neels Hofmeyr1804aa82017-03-29 16:45:51 +02001!/bin/sh
2### BEGIN INIT INFO
3# Provides: osmo-msc
4# Required-Start: $syslog $networking
5# Required-Stop: $syslog
6# Default-Start: 5
7# Default-Stop: 1
8# Short-Description: Osmocom MSC
9### END INIT INFO
10
11DAEMON=/usr/bin/osmo-msc
12NAME=osmo-msc
13DESC="Osmocom MSC"
14NORMAL_ARGS="-C -D -c /etc/osmocom/osmo-msc.cfg -l /var/lib/osmocom/sms.db"
15
16OSMOMSC_EXTRA_ARGS=""
17NO_START=1
18
19set -e
20
21test ! -r /etc/default/osmo-msc || . /etc/default/osmo-msc
22test "$NO_START" = "0" || exit 0
23test -x "$DAEMON" || exit 0
24
25case "$1" in
26 start)
27 echo -n "Starting $DESC: "
28 start-stop-daemon -S \
29 -x "$DAEMON" -- $NORMAL_ARGS $OSMOMSC_EXTRA_ARGS
30 echo "$NAME."
31 ;;
32 stop)
33 echo -n "Stopping $DESC: "
34 start-stop-daemon -K -x "$DAEMON"
35 echo "$NAME."
36 ;;
37 restart|force-reload)
38 $0 stop
39 $0 start
40 ;;
41 *)
42 N=/etc/init.d/$NAME
43 echo "Usage: $N {start|stop|restart}" >&2
44 exit 1
45 ;;
46esac
47
48exit 0