mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
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:
committed by
Florian Eckert
parent
25b156a71b
commit
1302e503a3
@@ -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
|
||||
|
||||
|
||||
@@ -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}" \
|
||||
|
||||
Reference in New Issue
Block a user