[check_cert] ajout des certifs fichiers
This commit is contained in:
parent
96ed50c79f
commit
64cb8ab2e7
2 changed files with 30 additions and 10 deletions
|
@ -6,13 +6,21 @@ 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,
|
||||
def check_cert(host='localhost', port=443, user="www-data", filename=None):
|
||||
params={
|
||||
'host': host,
|
||||
'port': port,
|
||||
'user': user,
|
||||
'filename': filename,
|
||||
}
|
||||
if filename:
|
||||
print "43 7 * * * %(user)s /usr/scripts/utils/check_cert.py --filename %(filename)s" %\
|
||||
params
|
||||
else:
|
||||
print "42 7 * * * %(user)s /usr/scripts/utils/check_cert.py %(host)s %(port)s" %\
|
||||
params
|
||||
|
||||
# Host specific
|
||||
if has('https-server') or has('https_cert'):
|
||||
check_cert('localhost', 443, 'www-data')
|
||||
|
||||
|
@ -21,3 +29,14 @@ if has('bcfg2-server'):
|
|||
|
||||
if has('asterisk'):
|
||||
check_cert('localhost', 5061)
|
||||
|
||||
# file specific
|
||||
if has('eap'):
|
||||
check_cert(filename='/etc/freeradius/certs/wifi.crt', user='freerad')
|
||||
|
||||
if has('vpn'):
|
||||
check_cert(filename='/etc/ssl/certs/vpn.pem', user='root')
|
||||
|
||||
if has('xmpp'):
|
||||
check_cert(filename='/etc/ssl/certs/jabber_server.pem', user='jabber')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue