Skip to content

Commit

Permalink
Merge pull request #6114 from NerLOR/master
Browse files Browse the repository at this point in the history
dns_world4you: Adapt to change in world4you.com DeleteDnsRecordForm
  • Loading branch information
Neilpang authored Dec 7, 2024
2 parents 223dc87 + 157d3f9 commit b4c02ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dnsapi/dns_world4you.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ dns_world4you_rm() {

_resethttp
export ACME_HTTP_NO_REDIRECTS=1
body="DeleteDnsRecordForm[recordId]=$recordid&DeleteDnsRecordForm[uniqueFormIdDP]=$formiddp&DeleteDnsRecordForm[_token]=$form_token"
body="DeleteDnsRecordForm[id]=$recordid&DeleteDnsRecordForm[uniqueFormIdDP]=$formiddp&DeleteDnsRecordForm[_token]=$form_token"
_info "Removing record..."
ret=$(_post "$body" "$WORLD4YOU_API/$paketnr/dns/record/delete" '' POST 'application/x-www-form-urlencoded')
_resethttp
Expand Down Expand Up @@ -203,6 +203,7 @@ _get_paketnr() {
form="$2"

domains=$(echo "$form" | grep '<ul class="nav header-paket-list">' | sed 's/<li/\n<li/g' | sed 's/<[^>]*>/ /g' | sed 's/^.*>\([^>]*\)$/\1/')
_debug domains "$domains"
domain=''
for domain in $domains; do
if _contains "$fqdn" "$domain\$"; then
Expand All @@ -217,7 +218,7 @@ _get_paketnr() {
TLD="$domain"
_debug domain "$domain"
RECORD=$(echo "$fqdn" | cut -c"1-$((${#fqdn} - ${#TLD} - 1))")
PAKETNR=$(echo "$domains" | grep "$domain" | sed 's/^[^,]*, *\([0-9]*\).*$/\1/')
PAKETNR=$(echo "$domains" | grep -o " $domain.*" | sed 's/^[^,]*, *\([0-9]*\).*$/\1/')
return 0
}

Expand Down

0 comments on commit b4c02ec

Please sign in to comment.