You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-accessibility/speechd-up/files/speechd-up.rc

40 lines
834 B

#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
SPEAKUPDEV=/dev/softsynth
SPEAKUPDIR=/sys/module/speakup/parameters
depend() {
use eflite festival
need speech-dispatcher
}
check_speakup() {
if [ ! -d ${SPEAKUPDIR} ]; then
eerror "Speakup is not currently running."
eerror "Please correct this before using speechd-up."
return 1
fi
if [ ! -c ${SPEAKUPDEV} ]; then
mknod ${SPEAKUPDEV} c 10 26
fi
echo soft > ${SPEAKUPDIR}/synth
sleep 1
}
start() {
check_speakup || return 1
ebegin "Starting speechd-up"
start-stop-daemon --start --quiet --nicelevel ${NICELEVEL} --exec /usr/bin/speechd-up -- -d -t
eend $?
}
stop() {
ebegin "Stopping speechd-up"
start-stop-daemon --stop --quiet --pidfile /var/run/speechd-up.pid
eend $?
}