#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-accessibility/speech-dispatcher/files/speech-dispatcher,v 1.3 2004/07/14 21:07:55 agriffis Exp $

depend() {
	use alsasound esound festival speechd
}

start() {
	ebegin "Starting speech-dispatcher"
	start-stop-daemon --start --quiet --background --exec /usr/bin/speech-dispatcher -- -d
	eend $?
}

stop() {
	ebegin "Stopping speech-dispatcher"
	start-stop-daemon --stop --quiet --pidfile /var/run/speech-dispatcher.pid
	eend $?
}

restart() {
	svc_stop || exit 1
	sleep 2
	svc_start || exit 1
}
