From 57473ef39c78679f276c2f5b9b5343d97d388096 Mon Sep 17 00:00:00 2001 From: John Supplee Date: Fri, 5 Apr 2019 23:44:18 +0200 Subject: [PATCH] fix problem with SSL certificate provisioning --- management/ssl_certificates.py | 6 +++--- tools/dns-cleanup.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/management/ssl_certificates.py b/management/ssl_certificates.py index 6d433b54..e2e582a2 100755 --- a/management/ssl_certificates.py +++ b/management/ssl_certificates.py @@ -313,7 +313,7 @@ def provision_certificates(env, limit_domains): webroot = os.path.join(account_path, 'webroot') os.makedirs(webroot, exist_ok=True) with tempfile.TemporaryDirectory() as d: - miab_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + miab_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) cert_file = os.path.join(d, 'cert_and_chain.pem') print("Provisioning TLS certificates for " + ", ".join(domain_list) + ".") certbotret = subprocess.check_output([ @@ -331,8 +331,8 @@ def provision_certificates(env, limit_domains): "--manual", "--preferred-challenge", "dns", - "--manual-auth-hook", os.path.join(miab_dir, "/tools/dns-auth.sh"), - "--manual-cleanup-hook", os.path.join(miab_dir, "/tools/dns-cleanup.sh"), + "--manual-auth-hook", os.path.join(miab_dir, "tools/dns-auth.sh"), + "--manual-cleanup-hook", os.path.join(miab_dir, "tools/dns-cleanup.sh"), "--config-dir", account_path, #"--staging", diff --git a/tools/dns-cleanup.sh b/tools/dns-cleanup.sh index f9ac582d..cefad58f 100755 --- a/tools/dns-cleanup.sh +++ b/tools/dns-cleanup.sh @@ -5,4 +5,4 @@ API_KEY=`cat /var/lib/mailinabox/api.key` HOSTNAME=`hostname` -curl -s -X DELETE --user "$API_KEY:" https://$HOSTNAME/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/TXT \ No newline at end of file +curl -s -X DELETE --user "$API_KEY:" https://$HOSTNAME/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/TXT