diff options
Diffstat (limited to 'system/pcsc-lite/rc.pcscd')
-rw-r--r-- | system/pcsc-lite/rc.pcscd | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/system/pcsc-lite/rc.pcscd b/system/pcsc-lite/rc.pcscd index 480414de62..613c80ae44 100644 --- a/system/pcsc-lite/rc.pcscd +++ b/system/pcsc-lite/rc.pcscd @@ -6,7 +6,7 @@ # before it for smooth experience with PCMCIA readers. # -PIDFILE=/var/run/pcscd.pid +PIDFILE=/var/run/pcscd/pcscd.pid PCSCD_OPTS="" # Start @@ -27,7 +27,7 @@ pcscd_stop() { echo "Stopping PC/SC-lite smart card daemon..." if [ -e "$PIDFILE" ]; then kill $(cat $PIDFILE) - rm -f $PIDFILE + rm -f $PIDFILE 1>&2 >/dev/null fi # Just in case: killall pcscd 1>&2 >/dev/null @@ -40,6 +40,15 @@ pcscd_restart() { pcscd_start } +# Status +pcscd_status() { + if [ -e "$PIDFILE" ]; then + echo "pcscd is running." + else + echo "pcscd is stopped." + fi +} + case "$1" in 'start') pcscd_start @@ -50,6 +59,9 @@ case "$1" in 'restart') pcscd_restart ;; +'status') + pcscd_status + ;; *) - echo "usage $0 start|stop|restart" + echo "usage $0 start|stop|restart|status" esac |