]> git.wh0rd.org - home.git/commitdiff
le-renew: handle single domain confs
authorMike Frysinger <vapier@gentoo.org>
Sun, 17 Jul 2016 06:03:11 +0000 (02:03 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 17 Jul 2016 06:03:11 +0000 (02:03 -0400)
.bin/le-renew

index 6c2354ceb29896510446aff738bfc9805fef6230..acc95678ef38c016e7b4aa0bc1d8bc195ed74239 100755 (executable)
@@ -107,7 +107,12 @@ def process_domain(domain, dry_run=False):
     logging.info('%s: checking', domain)
 
     conf = load_conf(domain)
-    webroot_path = conf.get('[webroot_map', domain)
+    try:
+        webroot_path = conf.get('[webroot_map', domain)
+    except configparser.NoOptionError:
+        webroot_path = conf.get('renewalparams', 'webroot_path')
+        # The conf writing has a bug here where it appends a comma.
+        webroot_path = webroot_path.rstrip(',')
 
     cert_path = os.path.realpath(conf.get('globals', 'cert'))