aboutsummaryrefslogtreecommitdiffstats
path: root/spo256/speak.init
blob: 0c46b8ace763c4e378a2fd70afa5cb589bd8063f (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
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh

# modify FILESYSTEMS to activate and use vmon.
FILESYSTEMS="/"

mode=$1

if [ $# = 0 ] ; then
	mode='rc'
fi

if [ ! "$mode" = 'rc' ] ; then
	# Source function library.
	. /etc/rc.d/init.d/functions

	# Source networking configuration.
	. /etc/sysconfig/network

	# Check that networking is up.
	[ ${NETWORKING} = "no" ] && exit 0
fi

# See how we were called.
case "$mode" in
  rc)
	echo "Starting SPO256-AL2 server"
	spo256
	if [ ! -z "$FILESYSTEMS" ] ; then
		vmon $FILESYSTEMS
	fi
	;;
  start)
	echo -n "Starting SPO256-AL2 speech services: "
	daemon spo256 
	if [ ! -z "$FILESYSTEMS" ] ; then
		daemon vmon $FILESYSTEMS
	fi
	echo
	touch /var/lock/subsys/speak
	;;
  stop)
	echo -n "Shutting down SPO256-AL2 speech services: "
	killproc spo256
	if [ ! -z "$FILESYSTEMS" ] ; then
		killproc vmon
	fi
	rm -f /var/lock/subsys/speak
	echo ""
	;;
  *)
	echo "Usage: speak.init {start|stop}"
	exit 1
esac