#!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # Author: Brice Arnould # Credits: To all those I got ideas from :) # # $Header: $ depend() { after alsasound } checkconfig() { if [ ! -p /dev/speech ] then eerror "You need to create the /dev/speech" return 1 fi if [ -e /var/run/speechd.pid -a "${FUNCT}" = "start" ] then eerror "Speechd is already started" return 1 fi if [ ! -e /var/run/speechd.pid -a "${FUNCT}" = "stop" ] then eerror "Speechd isn't started" return 1 fi } start() { checkconfig || return 1 ebegin "Starting speechd" /usr/bin/speechd -Q eend $? "Failed to start speechd" } stop() { checkconfig || return 1 ebegin "Stoping speechd" kill $(cat /var/run/speechd.pid) eend $? "Failed to stop speechd" }