me
/
guix
Archived
1
0
Fork 0

services: pcscd: Cleanup socket when started.

Otherwise when pcscd doesn't terminate properly (ie. receive a SIGKILL),
it won't start again because of it's socket already existing.

* gnu/services/security-token.scm (pcscd-shepherd-service)[start]:
Remove existing socket file.
master
Brice Waegeneire 2021-06-12 16:46:00 +02:00
parent eb939109b9
commit 4bed8486d4
No known key found for this signature in database
GPG Key ID: A94903A166A18FAE
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@ -57,6 +58,9 @@
(requirement '(syslogd))
(modules '((gnu build shepherd)))
(start #~(lambda _
(let ((socket "/run/pcscd/pcscd.comm"))
(when (file-exists? socket)
(delete-file socket)))
(invoke #$(file-append pcsc-lite "/sbin/pcscd"))
(call-with-input-file "/run/pcscd/pcscd.pid" read)))
(stop #~(make-kill-destructor)))))))