diff options
Diffstat (limited to 'recipes/speech-dispatcher/files/speech-dispatcher.init')
-rw-r--r-- | recipes/speech-dispatcher/files/speech-dispatcher.init | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes/speech-dispatcher/files/speech-dispatcher.init b/recipes/speech-dispatcher/files/speech-dispatcher.init new file mode 100644 index 0000000000..c3be5d8385 --- /dev/null +++ b/recipes/speech-dispatcher/files/speech-dispatcher.init @@ -0,0 +1,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 |