ddns-scripts: add type field for digitalocean API

DigitalOcean API requires a "type" JSON field to update a DNS
record. This adds that while checking for IPv6 to change which
record type to use. Without it, the API call fails, making
the script unable to update the DNS records for DigitalOcean.

Signed-off-by: Adam Beck <subcursion@gmail.com>
This commit is contained in:
Adam Beck
2025-02-04 14:17:29 +00:00
committed by Florian Eckert
parent 25b156a71b
commit 1302e503a3
2 changed files with 2 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.2
PKG_RELEASE:=59
PKG_RELEASE:=60
PKG_LICENSE:=GPL-2.0

View File

@@ -24,6 +24,7 @@
json_init
json_add_string name "$username"
json_add_string data "$__IP"
[ $use_ipv6 -ne 0 ] && json_add_string type "AAAA" || json_add_string type "A"
__STATUS=$(curl -Ss -X PUT "https://api.digitalocean.com/v2/domains/${domain}/records/${param_opt}" \
-H "Authorization: Bearer ${password}" \