You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
566 B

#!/bin/sh
##
# Start PC/SC
##
. /etc/rc.common
StartService ()
{
if ! pid=$(GetPID pcscd); then
ConsoleMessage "Starting Smart Card Services"
rm -rf /tmp/pcsc
/usr/sbin/pcscd
fi
}
StopService ()
{
if pid=$(GetPID pcscd); then
ConsoleMessage "Stopping Smart Card Services"
kill -TERM "${pid}"
fi
}
RestartService ()
{
if pid=$(GetPID pcscd); then
ConsoleMessage "Restarting Smart Card Services"
kill -TERM "${pid}"
fi
# Leave pcscd the time to die
sleep 3
StartService
}
RunService "$1"