updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / spk-connect-ttsynth / spk-connect
blobd52c6904c6670b257356d1fc7fbf85f90050c3e5
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/conf.d/spk-connect
5 . /etc/rc.d/functions
7 PID=`pidof spk-connect`
8 PIDFILE=/var/run/spk-connect.pid
9 case "$1" in
10 start)
11 stat_busy "Starting spk-connect"
12 if [ -z "$PID" ]; then
13 if [ -f $PIDFILE ]; then
14 rm $PIDFILE
16 /usr/bin/spk-connect-ttsynth $SPK_CONNECT_ARGS
17 if [ $? -gt 0 ]; then
18 stat_fail
19 else
20 add_daemon spk-connect
21 stat_done
25 stop)
26 stat_busy "Stopping spk-connect"
27 [ ! -z "$PID" ] && kill $PID &> /dev/null
28 if [ $? -gt 0 ]; then
29 stat_fail
30 else
31 rm_daemon spk-connect
32 stat_done
35 restart)
36 $0 stop
37 sleep 2
38 $0 start
41 echo "usage: $0 {start|stop|restart}"
42 esac
43 exit 0