Skip to content

Commit

Permalink
small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Henning Reich committed Nov 27, 2024
1 parent a94ac63 commit 6d30288
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dnsapi/dns_technitium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ Author: Henning Reich <acmesh@qupfer.de>
'

dns_technitium_add() {
_info "add txt Record using Technitium"
_Technitium_account
fulldomain=$1
txtvalue=$2
_Technitium_account
_info "Using Technitium"
_debug fulldomain "$fulldomain"
_debug txtvalue "$txtvalue"
response="$(_get "$Technitium_Server/api/zones/records/add?token=$Technitium_Token&domain=$fulldomain&type=TXT&text=${txtvalue}")"
if _contains "$response" '"status":"ok"'; then
return 0
Expand All @@ -27,10 +25,10 @@ dns_technitium_add() {
}

dns_technitium_rm() {
_info "remove txt record using Technitium"
_Technitium_account
fulldomain=$1
txtvalue=$2
_Technitium_account
_info "Using Technitium"
response="$(_get "$Technitium_Server/api/zones/records/delete?token=$Technitium_Token&domain=$fulldomain&type=TXT&text=${txtvalue}")"
if _contains "$response" '"status":"ok"'; then
return 0
Expand Down

0 comments on commit 6d30288

Please sign in to comment.