Browse Source

unused code removed

pull/2563/head
peterkelm 5 years ago committed by GitHub
parent
commit
c1b089d1c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      dnsapi/dns_variomedia.sh

18
dnsapi/dns_variomedia.sh

@ -30,14 +30,6 @@ dns_variomedia_add() {
_debug _sub_domain "$_sub_domain"
_debug _domain "$_domain"
# _debug 'Getting txt records'
# _variomedia_rest GET "/dns-records?filter[domain]=$_domain"
# if printf "%s\n" "$response" | grep "\"record_type\": \"A\", \"fqdn\": \"$fulldomain\"" >/dev/null; then
# _err 'Error'
# return 1
# fi
if ! _variomedia_rest POST "dns-records" "{\"data\": {\"type\": \"dns-record\", \"attributes\": {\"record_type\": \"TXT\", \"name\": \"$_sub_domain\", \"domain\": \"$_domain\", \"data\": \"$txtvalue\", \"ttl\":300}}}"; then
_err "$response"
return 1
@ -119,13 +111,7 @@ _get_root() {
_sub_domain="$(echo "$fulldomain" | sed "s/\\.$h\$//")"
_domain=$h
return 0
# else
# _err 'Invalid domain'
# return 1
fi
# else
# _err "$response"
# return 1
fi
i=$(_math "$i" + 1)
done
@ -141,10 +127,6 @@ _variomedia_rest() {
data="$3"
_debug "$ep"
# api_key_trimmed=$(echo $VARIOMEDIA_API_TOKEN | tr -d '"')
# export _H1="Api-Key: $api_key_trimmed"
export _H1="Authorization: token $VARIOMEDIA_API_TOKEN"
export _H2="Content-Type: application/vnd.api+json"
export _H3="Accept: application/vnd.variomedia.v1+json"

Loading…
Cancel
Save