| author | Tomas Zeman <tzeman@volny.cz> |
| Fri, 29 Dec 2017 09:01:23 +0100 | |
| changeset 33 | 338ee0353bf1 |
| parent 29 | 3f6120005a40 |
| permissions | -rw-r--r-- |
|
28
7cccb5cf738b
conf/openssl.conf: certificate expiration checks
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
1 |
# Certificate monitoring |
|
7cccb5cf738b
conf/openssl.conf: certificate expiration checks
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
2 |
|
|
7cccb5cf738b
conf/openssl.conf: certificate expiration checks
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
3 |
# Number of seconds till certificate expires |
|
7cccb5cf738b
conf/openssl.conf: certificate expiration checks
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
4 |
# Parameters: $1 - path to cert file |
|
29
3f6120005a40
conf/openssl-bsd.conf: Use BSD variant of date(1)
Tomas Zeman <tzeman@volny.cz>
parents:
28
diff
changeset
|
5 |
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
|
|
28
7cccb5cf738b
conf/openssl.conf: certificate expiration checks
Tomas Zeman <tzeman@volny.cz>
parents:
diff
changeset
|
6 |