Closed nnn1590 closed 2 years ago
This looks like a bug in the get_json_field()
function (it's returning "rrset_href" instead of just the record value). I'll start looking into this today. Thanks for reporting it! (And your English is fine!)
This should be fixed in the latest release (and in the master branch). Let me know if it works!
Oh, and if you're using standard input (-s
) to provide your IP address, you can remove the -i <interface>
part of the command (it will be ignored anyway since you specified -s
). Just thought I'd mention it since I noticed it in your example commands.
It works! Thank you!
Since Dec 23 2021, I get the error
Sorry, but gad does not support updating multiple records with the same name.
sometimes.The order in the record_json seems to be random, and the script will fail if
rrset_values
is not at the end.Successful attempt:
Failed attempt:
Full log of failed attempt
```console $ curl -s ipinfo.io/ip | gad -e -s -5 -iPatch to show record_value
```diff diff --git a/gad b/gad index 1b2c3e3..db524fd 100755 --- a/gad +++ b/gad @@ -310,6 +310,9 @@ check() { record_value=$(get_json_field "rrset_values" "$record_json") record_ttl=$(get_json_field "rrset_ttl" "$record_json") record_count=$(printf "%s" "$record_value" | wc -w) + if [ "$debug" = "yes" ]; then + printf "record_value:\\n---\\n%s\\n---\\n\\n" "$record_value" + fi # If a custom TTL wasn't provided, just set it to the existing one. # If the record TTL is empty (because the record doesn't exist) and # no custom TTL was provided, set a default. ```I'm sorry if my english is wrong.