From: Adam Beck Date: Tue, 4 Feb 2025 14:17:29 +0000 (+0000) Subject: ddns-scripts: add type field for digitalocean API X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1302e503a37d69d44bc1c08344d9221764245c1c;p=feed%2Fpackages.git 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 --- diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 3fd99644e8..025d39802a 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -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 diff --git a/net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh b/net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh index 5ee1b13fe7..db68a2139b 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh @@ -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}" \