blob: 9a9e0e73c1a6eee176a189315d28269e8eb47ad5 [file] [log] [blame]
xf.li86118912025-03-19 20:07:27 -07001#!/bin/sh
2#
3# Run the daemon
4#
5
6DAEMON="msm_svr"
7PIDFILE="/var/run/$DAEMON.pid"
8EXEC="/usr/bin/msm_svr"
9
10start() {
11 echo -n "Starting $DAEMON... "
12 start-stop-daemon --no-close -S -b -m -p $PIDFILE -x $EXEC
13 [ $? -eq 0 ] && echo "OK" || echo "ERROR"
14}
15
16stop() {
17 echo -n "Stopping $DAEMON... "
18 start-stop-daemon -K -p $PIDFILE
19 [ $? -eq 0 ] && echo "OK" || echo "ERROR"
20}
21
22restart() {
23 stop
24 start
25}
26
27case "$1" in
28 start|stop|restart)
29 "$1"
30 ;;
31 *)
32 echo "Usage: $0 {start|stop|restart}"
33 exit 1
34esac
35
36exit $?