#!/sbin/runscript
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcsc-lite/files/pcscd-init,v 1.5 2009/04/10 23:54:35 arfrever Exp $

depend() {
	/usr/sbin/pcscd --version | grep libhal > /dev/null && need hald
}

start() {
	# pcscd won't start if these exist
	rm -f /var/run/pcscd.{comm,pub}
	ebegin "Starting pcscd"
	/usr/sbin/pcscd ${PCSCD_OPTS}
	eend $?
}

stop() {
	ebegin "Stopping pcscd"
	start-stop-daemon --stop --quiet --exec /usr/sbin/pcscd
	eend $?
}
