#!/usr/bin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Copyright 2019 Artix Linux
# Distributed under the terms of the GNU General Public License v2

name="PC/SC Daemon"

supervisor=supervise-daemon
command=/usr/bin/pcscd
command_args="${EXTRA_OPTS} -f"
command_user="${PCSCD_USER}:${PCSCD_GROUP}"

depend() {
    need localmount
    after udev openct dbus
    use logger
}

start_pre() {
    checkpath -d -m 0755 -o "$command_user" /run/pcscd
}

