Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 6a1d2f23e9baa3462c9bb521842acd3e > files > 4

pcsc-lite-1.6.6-1.mga1.src.rpm

#!/bin/sh
#
# pcscd        Starts the pcscd Daemon
#
#
# chkconfig: 2345 12 88
# description: PC/SC Daemon
# pidfile: /var/run/pcscd.pid

### BEGIN INIT INFO
# Description: pcscd is the daemon program for PC/SC Lite. It is a resource \
#              manager that coorinates communications with Smart Card readers and Smart \
#              Cards that are connected to the system.
#
# Provides: pcscd
# Short-Description: Smart Card Services
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 3 5
# Default-Stop: 0 6
### END INIT INFO

. /etc/init.d/functions

[ -f /usr/sbin/pcscd ] || exit 0

start() {
 	gprintf "Starting smart card daemon: "
	daemon pcscd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/pcscd
	return $RETVAL
}

stop() {
	gprintf "Shutting down smart card daemon: "
	killproc pcscd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/pcscd
	return $RETVAL
}

restart() {
	stop
	start
}

case "$1" in
  start)
  	start
	;;

  stop)
  	stop
	;;

  status)
  	status pcscd
	;;
  restart|reload)
	restart
	;;
  condrestart)
  	[ -f /var/lock/subsys/pcscd ] && restart || :
	;;
  *)
	gprintf "Usage: %s {start|stop|status|restart|condrestart}\n" "pcscd"
	exit 1
esac

exit $?