|
|
@ -22,7 +22,6 @@ dns_simply_add() { |
|
|
|
_simply_save_config |
|
|
|
|
|
|
|
_debug "First detect the root zone" |
|
|
|
|
|
|
|
if ! _get_root "$fulldomain"; then |
|
|
|
_err "invalid domain" |
|
|
|
return 1 |
|
|
@ -68,7 +67,7 @@ dns_simply_rm() { |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
|
|
|
|
records=$(echo "$response" | tr '{' "\n" | grep 'record_id\|type\|data\|\name' | sed 's/\"record_id/;\"record_id/' | tr "\n" ' '| tr -d ' ' | tr ';' ' ') |
|
|
|
records=$(echo "$response" | tr '{' "\n" | grep 'record_id\|type\|data\|\name' | sed 's/\"record_id/;\"record_id/' | tr "\n" ' ' | tr -d ' ' | tr ';' ' ') |
|
|
|
|
|
|
|
nr_of_deleted_records=0 |
|
|
|
_info "Fetching txt record" |
|
|
@ -76,11 +75,11 @@ dns_simply_rm() { |
|
|
|
for record in $records; do |
|
|
|
_debug record "$record" |
|
|
|
|
|
|
|
record_data=$(echo "$record" | cut -d "," -f 3 | sed 's/"//g' | grep "data" | cut -d ":" -f 2) |
|
|
|
record_type=$(echo "$record" | cut -d "," -f 4 | sed 's/"//g' | grep "type" | cut -d ":" -f 2) |
|
|
|
record_data=$(echo "$record" | cut -d "," -f 3 | sed 's/"//g' | grep "data" | cut -d ":" -f 2) |
|
|
|
record_type=$(echo "$record" | cut -d "," -f 4 | sed 's/"//g' | grep "type" | cut -d ":" -f 2) |
|
|
|
|
|
|
|
_debug2 record_data "$record_data" |
|
|
|
_debug2 record_type "$record_type" |
|
|
|
_debug2 record_data "$record_data" |
|
|
|
_debug2 record_type "$record_type" |
|
|
|
|
|
|
|
if [ "$record_data" = "$txtvalue" ] && [ "$record_type" = "TXT" ]; then |
|
|
|
|
|
|
|