diff options
Diffstat (limited to 'gnu/services/security-token.scm')
-rw-r--r-- | gnu/services/security-token.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gnu/services/security-token.scm b/gnu/services/security-token.scm index ec26006538..52afad84a6 100644 --- a/gnu/services/security-token.scm +++ b/gnu/services/security-token.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Arun Isaac <[email protected]> ;;; Copyright © 2020 Tobias Geerinckx-Rice <[email protected]> +;;; Copyright © 2021 Brice Waegeneire <[email protected]> ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,8 +58,13 @@ (requirement '(syslogd)) (modules '((gnu build shepherd))) (start #~(lambda _ - (invoke #$(file-append pcsc-lite "/sbin/pcscd")) - (call-with-input-file "/run/pcscd/pcscd.pid" read))) + (let ((socket "/run/pcscd/pcscd.comm")) + (when (file-exists? socket) + (delete-file socket))) + (fork+exec-command + (list #$(file-append pcsc-lite "/sbin/pcscd") + "--foreground") + #:log-file "/var/log/pcscd.log"))) (stop #~(make-kill-destructor))))))) (define pcscd-activation |