From 98256ab5c14293d9f5eb7963eda6aa11bc8b6718 Mon Sep 17 00:00:00 2001 From: atisne Date: Thu, 17 Mar 2022 11:17:41 +0100 Subject: [PATCH] Add the ability to set DNS API configuration at domain level ACME-DNS provide credentials for each domain. Each credential is allowed to update only its subdomain record. --- dns_scripts/dns_add_acmedns | 5 +++++ getssl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dns_scripts/dns_add_acmedns b/dns_scripts/dns_add_acmedns index a8c3073..601d0a9 100755 --- a/dns_scripts/dns_add_acmedns +++ b/dns_scripts/dns_add_acmedns @@ -1,4 +1,9 @@ #!/usr/bin/env bash + +# ACMEDNS env variables can be set in a config file at domain level +acme_config="$DOMAIN_DIR/acme-dns.cfg" +[ -s "$acme_config" ] && . "$acme_config" + # Need to add your API user and key below or set as env variable apiuser=${ACMEDNS_API_USER:-''} apikey=${ACMEDNS_API_KEY:-''} diff --git a/getssl b/getssl index 7be6551..f0236c9 100755 --- a/getssl +++ b/getssl @@ -2980,7 +2980,7 @@ fi # Define defaults for variables not set in the main config. ACCOUNT_KEY="${ACCOUNT_KEY:=$WORKING_DIR/account.key}" DOMAIN_STORAGE="${DOMAIN_STORAGE:=$WORKING_DIR}" -DOMAIN_DIR="$DOMAIN_STORAGE/$DOMAIN" +export DOMAIN_DIR="$DOMAIN_STORAGE/$DOMAIN" CERT_FILE="$DOMAIN_DIR/${DOMAIN}.crt" FULL_CHAIN="$DOMAIN_DIR/fullchain.crt" CA_CERT="$DOMAIN_DIR/chain.crt"