summaryrefslogtreecommitdiff
path: root/packages/speech-dispatcher/files/speech-dispatcher.init
blob: c3be5d83854c5a961d5b19dd997759edded98270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh


PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/speech-dispatcher
PIDFILE=/var/run/speech-dispatcher.pid
NAME=speech-dispatcher
DESC='Speech Dispatcher'
USER=speech-dispatcher

test -f $DAEMON || exit 0

set -e

case "$1" in
  start)
	echo "Starting $NAME"
	start-stop-daemon --start --quiet --pidfile $PIDFILE \
          --exec $DAEMON

	;;
  stop)
  	echo "Stopping $NAME"
	start-stop-daemon --oknodo --stop --quiet \
          --pidfile $PIDFILE --exec $DAEMON
	;;
  restart)
	echo "Restarting $NAME"
	start-stop-daemon --oknodo --stop --quiet \
          --pidfile $PIDFILE --exec $DAEMON
	sleep 3
	start-stop-daemon --start --quiet --pidfile $PIDFILE \
          --exec $DAEMON
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
	exit 1
	;;
esac

exit 0