add smartcard component

This commit is contained in:
Ertuğrul Erata
2019-05-21 19:13:22 +03:00
parent 0fbf5e3e0e
commit aac49137b0
12 changed files with 405 additions and 19 deletions
@@ -0,0 +1,29 @@
from comar.service import *
serviceType = "local"
serviceDefault = "on"
serviceDesc = _({"en": "PC/SC SmartCard Reader Service",
"tr": "PC/SC Akıllı Kart Okuyucu Servisi"})
PIDFILE = "/run/pcscd/pcscd.pid"
@synchronized
def start():
# pcscd wont start if these exist
import os
try:
os.unlink("/run/pcscd/pcscd.comm")
os.unlink("/run/pcscd/pcscd.pub")
except OSError:
pass
startService(command="/usr/sbin/pcscd",
donotify=True)
@synchronized
def stop():
stopService(pidfile=PIDFILE,
donotify=True)
def status():
return isServiceRunning(pidfile=PIDFILE)