Created
September 21, 2016 06:32
-
-
Save MarkusH/9fb1465f92e7b337b8034491e7865b90 to your computer and use it in GitHub Desktop.
Check if GPG key is expiring soon (next 30 days)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
test $(($((`gpg --with-colons --fixed-list-mode --list-keys 0xAFE79D68D41C7E39 | egrep '^(pub|sub):' | cut -d: -f7 | sort | head -n 1` - `date +"%s"`))/86400)) -le 30 && echo "expiring soon" || echo "still good" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Renew key with: