wok-next diff pcsc-lite/stuff/pcscd @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | pcsc-lite/stuff/init.d/pcscd@7f188676b59c |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/pcsc-lite/stuff/pcscd Fri Nov 02 14:15:08 2018 +0200 1.3 @@ -0,0 +1,43 @@ 1.4 +#!/bin/sh 1.5 +# /etc/init.d/pcscd: Start, stop and restart pcsc-lite daemon on SliTaz, 1.6 +# at boot time or with the command line. Daemons options are configured 1.7 +# with /etc/daemons.conf 1.8 +# 1.9 +. /etc/init.d/rc.functions 1.10 +. /etc/daemons.conf 1.11 + 1.12 +NAME=Pcscd 1.13 +DESC="$(_ 'PC/SC smart card daemon')" 1.14 +DAEMON=/usr/sbin/pcscd 1.15 +PIDFILE=/run/pcscd/pcscd.pid 1.16 + 1.17 +case "$1" in 1.18 + start) 1.19 + if active_pidfile $PIDFILE pcscd ; then 1.20 + _ '%s is already running.' $NAME 1.21 + exit 1 1.22 + fi 1.23 + action 'Starting %s: %s...' "$DESC" $NAME 1.24 + mkdir -p $(dirname $PIDFILE) 1.25 + $DAEMON $PCSCD_OPTIONS 1.26 + status ;; 1.27 + stop) 1.28 + if ! active_pidfile $PIDFILE pcscd ; then 1.29 + _ '%s is not running.' $NAME 1.30 + exit 1 1.31 + fi 1.32 + action 'Stopping %s: %s...' "$DESC" $NAME 1.33 + kill $(cat $PIDFILE) 1.34 + [ -e $PIDFILE ] && rm -f $PIDFILE 1.35 + status ;; 1.36 + restart) 1.37 + $0 stop 1.38 + sleep 2 1.39 + $0 start ;; 1.40 + *) 1.41 + emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 1.42 + newline 1.43 + exit 1 ;; 1.44 +esac 1.45 + 1.46 +exit 0