aboutsummaryrefslogtreecommitdiff
path: root/accessibility/speech-dispatcher/files/speechd.in
blob: d17a7238e706d5cc53a3c8c955f87a5ac19490b4 (plain) (blame)
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
#!/bin/sh
#
# PROVIDE: speechd
# REQUIRE: DAEMON dbus
#
# Add the following to /etc/rc.conf to start speech-dispatcher at boot time:
#
# speechd_enable="YES"
#

. /etc/rc.subr

speechd_enable=${speechd_enable-"NO"}

name="speechd"
rcvar=`set_rcvar`

real_name="speech-dispatcher"
command="%%PREFIX%%/bin/${real_name}"
command_args="-C %%ETCDIR%%"
pidfile="/var/run/${real_name}.pid"

start_precmd="${name}_prestart"
stop_postcmd="${name}_poststop"

speechd_prestart()
{
	mkdir -p /var/log/${real_name}
}

speechd_poststop()
{
	rm -f $pidfile
}

load_rc_config $name
run_rc_command "$1"