Browse Source

More verbose

jigen 4 years ago
parent
commit
057dbb8510
1 changed files with 5 additions and 0 deletions
  1. 5 0
      OTcerts.py

+ 5 - 0
OTcerts.py

@@ -230,6 +230,7 @@ if __name__ == '__main__':
         logging.info('Asking certificates for webmail')
         vhost_name = config['webmail']['vhost'].strip()
         webmails_list = ["webmail.{}".format(d.strip()) for d in config['webmail']['domains'].split(',') if len(d.strip())>0]
+        logging.info('vhost {}, domains_list {}'.format(vhost_name, webmails_list)
         if acme_request(config, vhost_name, acme_test='HTTP-01', dryrun=dryrun, domains_list=webmails_list):
             link_cert(config, vhost_name, vhost_name, dryrun=dryrun)
         else:
@@ -245,6 +246,7 @@ if __name__ == '__main__':
         alias_list = get_alias_list(config, dns_conn, mbox_query, server_addresses)
         # Per usi futuri, aggiungo l'alias 'mail.indivia.net'
         alias_list.append('mail.indivia.net')
+        logging.info('vhost {}, domains_list {}'.format(vhost_name, alias_list)
         if acme_request(config, vhost_name, acme_test='HTTP-01', webroot=config['mail']['mbox_webroot'].strip(),
                         dryrun=dryrun, domains_list=alias_list):
             # non e' richiesto il link, punto direttamente le configurazioni alle dir di letsencrypt
@@ -261,6 +263,7 @@ if __name__ == '__main__':
         smtp_fmt = ','.join(['%s'] * len(server_addresses))
         smtp_query = smtp_list_stmt.format(smtp_fmt)
         alias_list = get_alias_list(config, dns_conn, smtp_query, server_addresses)
+        logging.info('vhost {}, domains_list {}'.format(vhost_name, alias_list)
         if acme_request(config, vhost_name, acme_test='HTTP-01', webroot=config['mail']['smtp_webroot'].strip(),
                         dryrun=dryrun, domains_list=alias_list):
             # non e' richiesto il link, punto direttamente le configurazioni alle dir di letsencrypt
@@ -281,6 +284,7 @@ if __name__ == '__main__':
             # Controlla se i nameserver sono gestiti da noi
             if domain_feat['managed_ns']:
                 # Nel caso il nameserver sia gestito, chiedi certificati per il dominio e la wildcard
+                logger.info('Get certificates for {}, *.{}'.format(domain_name, domain_name))
                 if acme_request(config, domain_name, acme_test='DNS-01', dryrun=dryrun):
                     link_cert(config, domain_name, domain_name, dryrun=dryrun)
                     # Crea il link per ogni subdomain
@@ -290,6 +294,7 @@ if __name__ == '__main__':
                 # Nel caso i nameserver NON siano gestiti, allora chiedi un certificato per ogni sottodominio
                 # Crea il link per ogni subdomain
                 for subdomain in domain_feat['subdomains']:
+                    logger.info('Get certificates for {}'.format(domain_name))
                     if acme_request(config, subdomain, acme_test='HTTP-01', dryrun=dryrun):
                         link_cert(config, subdomain, subdomain, dryrun=dryrun)
         ot_conn.close()