summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcrypt-expiry-check3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypt-expiry-check b/crypt-expiry-check
index 572f821..6cc5dde 100755
--- a/crypt-expiry-check
+++ b/crypt-expiry-check
@@ -401,7 +401,8 @@ check_gpg_key_status() {
fi
GPG_ADDRESS="${1}"
- KEY_INFO="$(${GPG} --list-keys ${GPG_ADDRESS})"
+ KEY_INFO="$(${GPG} --list-secret-keys ${GPG_ADDRESS} 2> /dev/null)"
+ [ -z "${KEY_INFO}" ] && KEY_INFO="$(${GPG} --list-keys ${GPG_ADDRESS})"
KEY_DATE_STR="$(
echo "${KEY_INFO}" | \