# HG changeset patch # User Tomas Zeman # Date 1377861375 -7200 # Node ID 3f6120005a4025380d4416b441f913c91c187ba6 # Parent 7cccb5cf738bc5b4864eb9723a88b75759dd33d5 conf/openssl-bsd.conf: Use BSD variant of date(1) diff -r 7cccb5cf738b -r 3f6120005a40 conf/openssl-bsd.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/openssl-bsd.conf Fri Aug 30 13:16:15 2013 +0200 @@ -0,0 +1,6 @@ +# Certificate monitoring + +# Number of seconds till certificate expires +# Parameters: $1 - path to cert file +UserParameter=cert.x509.expire[*],openssl x509 -in $1 -enddate|grep notAfter|awk -F= '{print $$2}'|while read l; do t=`date -j -f "%b %e %T %Y %Z" "$l" +%s`; n=`date +%s`; echo `expr $t - $n`; done +