From 8d60a941c351c8f56827563708defd045279cdc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 6 Apr 2021 10:19:37 +0200 Subject: allsync: improve gpg key check --- local/bin/allsync | 2 +- private | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/local/bin/allsync b/local/bin/allsync index 37888ee..c268b97 100755 --- a/local/bin/allsync +++ b/local/bin/allsync @@ -70,7 +70,7 @@ fi if [ "${AUTORUN:-n}" = "y" ]; then exec &> >(logger -t "${0##*/}") - if [ "$(gpg-connect-agent 'KEYINFO CD075D7EF3A4F56769201CB9A186FB9DEC83A7A5' /bye | awk '{print $7}')" != "1" ]; then + if ! gpg-connect-agent 'KEYINFO --list' /bye | awk 'BEGIN {ec=1} $7 == "1" {ec=0} END {exit ec}'; then echo "Key not accessible. Disabling cron.." >&2 cron_disable exit 1 diff --git a/private b/private index 1ea28e6..42a7cd1 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 1ea28e684342707f0ef9d9f7a9c359f22da809fe +Subproject commit 42a7cd18ec8674a69b70d43931527553d24d7802 -- cgit v1.2.3