Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,20 @@ export PCSCLITE_CONFIG_DIR="${APPDIR}/etc/reader.conf.d"
PCSCD_RUN_DIR="/tmp/pcscd/run"
rm -rf "${PCSCD_RUN_DIR}"
mkdir -p "${PCSCD_RUN_DIR}"
echo "starting pcscd with ${APPDIR}/usr/bin/pcscd -f &"
"${APPDIR}/usr/bin/pcscd" -f &

cleanup_pcscd() {
if [ -n "$PCSCD_PID" ] && kill -0 "$PCSCD_PID" 2>/dev/null; then
echo "Killing pcscd process $PCSCD_PID"
kill "$PCSCD_PID" 2>/dev/null
wait "$PCSCD_PID" 2>/dev/null
fi
}

trap cleanup_pcscd EXIT TERM INT

echo "starting pcscd with ${APPDIR}/usr/bin/pcscd --foreground --auto-exit &"
"${APPDIR}/usr/bin/pcscd" --foreground --auto-exit &
PCSCD_PID=$!

DEFAULT_LANG=en_US.UTF-8
if [[ "$LANG" == "C.UTF-8" ]]
Expand Down