File: pcscd.init

package info (click to toggle)
pcsc-lite 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,700 kB
  • sloc: ansic: 13,894; python: 3,231; lex: 609; makefile: 246; sh: 54; xml: 22
file content (33 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download
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
}