ddns-scripts: add type field for digitalocean API
authorAdam Beck <subcursion@gmail.com>
Tue, 4 Feb 2025 14:17:29 +0000 (14:17 +0000)
committerFlorian Eckert <Eckert.Florian@googlemail.com>
Tue, 4 Feb 2025 15:27:16 +0000 (16:27 +0100)
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>
net/ddns-scripts/Makefile
net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh

index 3fd99644e85b3cf9a91413f4318c5a02fc600589..025d39802a7b40400cbcd84b0e5171d15f02910f 100644 (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
 
index 5ee1b13fe7899e29ee75a26b154a6db75dd51b3a..db68a2139beca1316a2ca753f238db9a001f11d5 100644 (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}" \