aboutsummaryrefslogtreecommitdiff
path: root/local/bin/allsync
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2021-04-06 10:19:37 +0200
committerKarel Kočí <karel.koci@nic.cz>2021-04-06 10:19:37 +0200
commit8d60a941c351c8f56827563708defd045279cdc8 (patch)
tree51870987eaa353be9e008eaf5e2447ce55150bb4 /local/bin/allsync
parent0277096fa6aea312109777c4a371bd1c705dd262 (diff)
downloadmyconfigs-8d60a941c351c8f56827563708defd045279cdc8.tar.gz
myconfigs-8d60a941c351c8f56827563708defd045279cdc8.tar.bz2
myconfigs-8d60a941c351c8f56827563708defd045279cdc8.zip
allsync: improve gpg key check
Diffstat (limited to 'local/bin/allsync')
-rwxr-xr-xlocal/bin/allsync2
1 files changed, 1 insertions, 1 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