if ! _transip_rest POST "domains/$_domain/dns""{\"dnsEntry\":{\"name\":\"$_sub_domain\",\"type\":\"TXT\",\"content\":\"$txtvalue\",\"expire\":300}}";then
if ! _transip_rest POST "domains/$_domain/dns""{\"dnsEntry\":{\"name\":\"$_sub_domain\",\"type\":\"TXT\",\"content\":\"$txtvalue\",\"expire\":300}}";then
_err "Could not add TXT record."
_err "Could not add TXT record."
@ -28,7 +28,7 @@ dns_transip_rm() {
_debug fulldomain="$fulldomain"
_debug fulldomain="$fulldomain"
txtvalue=$2
txtvalue=$2
_debug txtvalue="$txtvalue"
_debug txtvalue="$txtvalue"
_transip_setup $fulldomain||return1
_transip_setup "$fulldomain"||return1
_info "Removing TXT record."
_info "Removing TXT record."
if ! _transip_rest DELETE "domains/$_domain/dns""{\"dnsEntry\":{\"name\":\"$_sub_domain\",\"type\":\"TXT\",\"content\":\"$txtvalue\",\"expire\":300}}";then
if ! _transip_rest DELETE "domains/$_domain/dns""{\"dnsEntry\":{\"name\":\"$_sub_domain\",\"type\":\"TXT\",\"content\":\"$txtvalue\",\"expire\":300}}";then
_err "Could not remove TXT record $_sub_domain for $domain"
_err "Could not remove TXT record $_sub_domain for $domain"