diff --git a/app/letsencrypt_service b/app/letsencrypt_service index 62a4a8d0..e5a70583 100755 --- a/app/letsencrypt_service +++ b/app/letsencrypt_service @@ -198,7 +198,7 @@ function update_cert { [[ "$key" == "DNS_API" ]] && continue dns_api_keys+=("$key") local value="${acmesh_dns_config[$key]}" - declare -x "$key"="$value" + local -x "$key"="$value" done echo "Info: DNS challenge using $acmesh_dns_api DNS API with the following keys: ${dns_api_keys[*]}" @@ -420,16 +420,6 @@ function update_cert { local acmesh_return=$? - # DNS challenge: clean environment variables - if [[ "$acme_challenge" == "DNS-01" ]]; then - local -n acmesh_dns_config="ACMESH_${cid}_DNS_API_CONFIG" - # Loop over defined variable for acme.sh DNS api config - for key in "${!acmesh_dns_config[@]}"; do - [[ "$key" == "DNS_API" ]] && continue - unset "$key" - done - fi - # 0 = success, 2 = RENEW_SKIP if [[ $acmesh_return == 0 || $acmesh_return == 2 ]]; then for domain in "${hosts_array[@]}"; do