From 3311e2099a2f09380a8d82acaa6bafb229cde12c Mon Sep 17 00:00:00 2001 From: Fredrik Eriksson Date: Fri, 18 Jun 2021 20:24:21 +0200 Subject: [PATCH] fix cleanup script too --- files/acme-cleanup-loopia.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/acme-cleanup-loopia.py b/files/acme-cleanup-loopia.py index 5cfdcf1..3836987 100755 --- a/files/acme-cleanup-loopia.py +++ b/files/acme-cleanup-loopia.py @@ -56,12 +56,14 @@ def main(): else: client = xmlrpc.client.ServerProxy(uri = url, encoding='utf-8') + parts=[] while domain: res = client.getSubdomains(user, pwd, domain) if 'UNKNOWN_ERROR' not in res: break - subdomain, domain = domain.split('.', maxsplit=1) - subdomain = '_acme-challenge.{}'.format(subdomain) + part, domain = domain.split('.', maxsplit=1) + parts.append(part) + subdomain = '_acme-challenge.{}'.format('.'.join(parts)) if 'UNKNOWN_ERROR' in res: print("Failed to find domain in loopiadns")