# HG changeset patch # User Matthias Förste foerste@schlittermann.de # Date 1334740180 -7200 # Node ID 5f159c41e8a3861935f4d640d4c84bce1da98890 # Parent c2e97355a23973bd7aab2759fe7dfa2fdc86d87d added script to check the key ring for expiring keys diff -r c2e97355a239 -r 5f159c41e8a3 bin/check-key-expiry --- a/bin/check-key-expiry Tue Apr 17 14:22:44 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#!/bin/bash - -NOTIFY='edv@schlittermann.de' -WARNTIME=$(expr 30 \* 24 \* 60 \* 60) # seconds -EXPIRY=$(date -d $(LC_ALL= LANG= gpg -k --with-colons apt.schlittermann.de|grep '^pub'|cut -d: -f7) +%s) -TODAY=$(date +%s) - -if [[ $(( $EXPIRY - $TODAY )) -le $WARNTIME ]]; then - ( echo Subject: apt.schlittermann.de Archive Signing Key is about to expire - please extend expiry date; gpg -k apt.schlittermann.de ) | /usr/sbin/sendmail $NOTIFY -fi diff -r c2e97355a239 -r 5f159c41e8a3 bin/check-key-ring-expiry --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/check-key-ring-expiry Wed Apr 18 11:09:40 2012 +0200 @@ -0,0 +1,68 @@ +#!/bin/sh + +WARNTIME=$(expr 30 \* 24 \* 60 \* 60) # seconds +TODAY=$(date +%s) +#TODAY=$(date -d '2013-04-03' +%s) +UPLOADERS=~/repo/conf/uploaders/* +#UPLOADERS=/tmp/test + +EXPIRY= +ADDRESS= + +set_key_data() { + + e= + a= + k=${1} + EXPIRY= + ADDRESS= + IFS=':' read e a <