Complete reimplementation to support cross platform usage without namespaces
This commit is contained in:
12
scripts.d/10-cardstat.sh
Normal file
12
scripts.d/10-cardstat.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
cardstat() {
|
||||
local workdir="${GNUPGHOME:-$HOME/.gnupg}"
|
||||
|
||||
if ! gpg --card-status &>/dev/null; then
|
||||
systemctl restart pcscd;
|
||||
fi
|
||||
touch "${workdir}/unlock.txt";
|
||||
gpg --sign "${workdir}/unlock.txt";
|
||||
rm -f "${workdir}/unlock.txt.gpg";
|
||||
rm -f "${workdir}/unlock.txt";
|
||||
gpg --card-status;
|
||||
}
|
||||
Reference in New Issue
Block a user