Added check for apache config section

This commit is contained in:
jigen 2020-09-16 18:43:49 +02:00
parent 3ea16ce5f3
commit 8c2ea209c5

View file

@ -1,4 +1,5 @@
import os
import sys
import errno
@ -276,7 +277,6 @@ if __name__ == '__main__':
if acme_renew(config, pre_hook_cmd, post_hook_cmd, dryrun=dryrun):
logger.info("Done renew")
else:
# Fai le nuove richieste per i certificati
@ -300,6 +300,12 @@ if __name__ == '__main__':
# Caso speciale per l'hosting
if args.hosting:
logging.info('Asking certificates for hosted web domains')
try:
hosting_conf = config['apache']
except KeyError as e:
logger.error("Error parsing configuration, KeyError {}".format(e))
exit(-1)
ot_conn=connect_db(dict(config['ot_db']))
dns_conn=connect_db(dict(config['dns_db']))
# Subdomains da escludere