3 # speech-dispatcher A device independent layer for speech synthesis
7 # description: A device independent layer for speech synthesis.
9 # $Id: template.init 9117 2007-11-28 20:28:39Z qboosh
11 # Source function library
12 . /etc/rc.d/init.d/functions
14 # $ speech-dispatcher -h
15 # Usage: speech-dispatcher [-{d|s}] [-l {1|2|3|4|5}] [-p=port] | [-v] | [-h]
16 # Speech Dispatcher -- Common interface for Speech Synthesis (GNU GPL)
18 # -d, --run-daemon - Run as a daemon
19 # -s, --run-single - Run as single application
20 # -l, --log-level - Set log level (1..5)
21 # -p, --port - Specify a port number
22 # -P, --pid-file - Set path to pid file
23 # -C, --config-dir - Set path to configuration
24 # -v, --version - Report version of this program
25 # -h, --help - Print this info
32 # Get service config - may override defaults
33 [ -f /etc/sysconfig/speech-dispatcher ] && . /etc/sysconfig/speech-dispatcher
36 # Check if the service is already running?
37 if [ ! -f /var/lock/subsys/speech-dispatcher ]; then
38 msg_starting speech-dispatcher
39 daemon --user ${RUNAS:-speech-dispatcher} \
40 "$SERVICE_RUN_NICE_LEVEL" \
41 speech-dispatcher --pid-file ${PIDFILE:-/var/run/speech-dispatcher/speech-dispatcher.pid} \
42 ${LOGLEVEL:+--log-level $LOGLEVEL}
44 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/speech-dispatcher
46 msg_already_running speech-dispatcher
51 if [ -f /var/lock/subsys/speech-dispatcher ]; then
53 msg_stopping speech-dispatcher
54 killproc --pidfile ${PIDFILE:-/var/run/speech-dispatcher/speech-dispatcher.pid} speech-dispatcher -TERM
55 rm -f /var/lock/subsys/speech-dispatcher
57 msg_not_running speech-dispatcher
62 if [ -f /var/lock/subsys/speech-dispatcher ]; then
63 msg_reloading speech-dispatcher
64 killproc --pidfile ${PIDFILE:-/var/run/speech-dispatcher/speech-dispatcher.pid} speech-dispatcher -HUP
67 msg_not_running speech-dispatcher
73 if [ -f /var/lock/subsys/speech-dispatcher ]; then
77 msg_not_running speech-dispatcher
83 # See how we were called.
102 status speech-dispatcher
106 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"