From 60185bed3799aa170159a518d3de94c41891856f Mon Sep 17 00:00:00 2001 From: atisne Date: Thu, 17 Mar 2022 10:01:51 +0100 Subject: [PATCH] dns_del_acmedns should not be identical to dns_add_acmedns For now, acme-dns does not provide a delete API service. Its strategy is to update an existing record. So this call isn't relevant and must be neutral. --- dns_scripts/dns_del_acmedns | 43 +++++++------------------------------ 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/dns_scripts/dns_del_acmedns b/dns_scripts/dns_del_acmedns index a8c3073..ecc3af8 100755 --- a/dns_scripts/dns_del_acmedns +++ b/dns_scripts/dns_del_acmedns @@ -1,11 +1,11 @@ #!/usr/bin/env bash -# Need to add your API user and key below or set as env variable -apiuser=${ACMEDNS_API_USER:-''} -apikey=${ACMEDNS_API_KEY:-''} -apisubdomain=${ACMEDNS_SUBDOMAIN:-''} -# This script adds a token to acme-dns.io DNS for the ACME challenge -# usage dns_add_acme-dns "domain name" "token" +# This script aims to delete a token to acme-dns DNS for the ACME challenge +# However, for now, acme-dns does not provide a delete API service. +# Its strategy is to update an existing record. +# So this call isn't relevant and must be neutral. + +# usage dns_del_acmedns "domain name" "token" # return codes are; # 0 - success # 1 - error returned from server @@ -13,8 +13,6 @@ apisubdomain=${ACMEDNS_SUBDOMAIN:-''} fulldomain="${1}" token="${2}" -API='https://auth.acme-dns.io/update' - # Check initial parameters if [[ -z "$fulldomain" ]]; then echo "DNS script requires full domain name as first parameter" @@ -25,31 +23,6 @@ if [[ -z "$token" ]]; then exit 1 fi -curl_params=( - -H "accept: application/json" - -H "X-Api-Key: $apikey" - -H "X-Api-User: $apiuser" - -H 'Content-Type: application/json' -) - -generate_post_data() -{ - cat <