23 lines
581 B
Python
23 lines
581 B
Python
# -*- coding: utf-8; mode: python -*-
|
|
|
|
info["owner"] = "root"
|
|
info["group"] = "root"
|
|
info["perms"] = 0644
|
|
|
|
header("Check SSL certificates")
|
|
|
|
def check_cert(host='localhost', port=443, user="www-data"):
|
|
print "42 7 * * * %(user)s /usr/scripts/utils/check_cert.py %(host)s %(port)s" %\
|
|
{ 'host': host,
|
|
'port': port,
|
|
'user': user,
|
|
}
|
|
|
|
if has('https-server') or has('https_cert'):
|
|
check_cert('localhost', 443, 'www-data')
|
|
|
|
if has('bcfg2-server'):
|
|
check_cert(metadata.hostname, 6789)
|
|
|
|
if has('asterisk'):
|
|
check_cert('localhost', 5061)
|