From 6964a8489ca1dbcad995e74d20ff3a771cec979b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Fra=C3=9F?= Date: Thu, 26 Oct 2023 13:43:28 +0200 Subject: [PATCH] =?UTF-8?q?[fix]=20"certbot-hook"-Aktion:=20richtige=20Dom?= =?UTF-8?q?=C3=A4ne=20und=20Subdom=C3=A4ne=20verwenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/main.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/main.py b/source/main.py index ff50521..2e3656c 100644 --- a/source/main.py +++ b/source/main.py @@ -122,9 +122,11 @@ def main( ) # print(_json.dumps(result, indent = "\t")) elif (arguments.action == "certbot-hook"): - domain_full_parts = _os.environ["CERTBOT_DOMAIN"].split(".", 1) - domain = domain_full_parts[1] - name = (arguments.challenge_prefix + "." + domain_full_parts[0]) + domain_full_parts = _os.environ["CERTBOT_DOMAIN"].split(".") + account = ".".join(domain_full_parts[-2:]) + concern = ".".join(domain_full_parts[:-2]) + domain = account + name = (arguments.challenge_prefix + "." + concern) type_ = "TXT" content = _os.environ["CERTBOT_VALIDATION"] api_macro_save(