conf/openssl.conf
author Tomas Zeman <tzeman@volny.cz>
Fri, 30 Aug 2013 13:20:57 +0200
changeset 30 79eef9a447de
parent 28 7cccb5cf738b
child 34 b685225d4966
permissions -rw-r--r--
externalscripts/certificate_expiration-bsd: Certificate expiration check (BSD date(1) variant) as external check (via TCP)

# 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 -d"$l" +%s`; n=`date +%s`; echo `expr $t - $n`; done