1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
#! /usr/bin/env /lib/init/init-d-script
### BEGIN INIT INFO
# Provides: pcscd
# Required-Start: $local_fs $remote_fs $syslog
# Required-Stop: $local_fs $remote_fs $syslog
# Should-Start: udev
# Should-Stop: udev
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Daemon to access a smart card using PC/SC
# Description: The PC/SC daemon is used to dynamically
# allocate/deallocate reader drivers at runtime and manage
# connections to the readers.
### END INIT INFO
DESC="PCSC Lite resource manager"
NAME=pcscd
DAEMON=/usr/sbin/pcscd
PIDFILE=/run/pcscd/pcscd.pid
SETPRIV_ARGS="--reuid pcscd --regid=pcscd --clear-groups --no-new-privs --bounding-set=-all"
do_start_prepare()
{
{ getent passwd pcscd && getent group pcscd; } >/dev/null \
|| { log_failure_msg missing pcscd user or group; exit 1; }
# Make IPC dir for pcscd so we can start with privs already dropped
install -m 0755 -o pcscd -g pcscd -d "$(dirname $PIDFILE)"
}
do_reload_cmd() {
/usr/sbin/pcscd --hotplug
}
|