mirror of
https://github.com/openwrt/packages.git
synced 2025-12-16 07:31:20 +00:00
ddns-script: Change CURL call and redirect output in update_porkbun_v3
This also fixes: https://github.com/openwrt/packages/issues/26181 CURL funciton change was patterned on other ddns update scripts that uses also JSON request/response payloads similar to update_digitalocean_v2.sh:15014f93e1/net/ddns-scripts/files/usr/lib/ddns/update_digitalocean_com_v2.sh (L29)update_gcp_v1.sh:15014f93e1/net/ddns-scripts/files/usr/lib/ddns/update_gcp_v1.sh (L212)rebased and bumbped ddns-script version Signed-off-by: Rikki Vizcarra <rikki.vizcarra@gmail.com>
This commit is contained in:
committed by
Florian Eckert
parent
b093eea601
commit
1de23c1c12
@@ -59,9 +59,9 @@ function api_call() {
|
||||
url="$__API/$1"
|
||||
write_log 7 "API endpoint URL: $url"
|
||||
write_log 7 "API request JSON payload: $2"
|
||||
response=$($CURL --data "$2" "$url")
|
||||
write_log 7 "API response JSON payload: $response"
|
||||
echo "$response"
|
||||
response="$("$CURL" -s -X POST "$url" -H "Content-Type: application/json" --data "$2" -o "$DATFILE" 2>"$ERRFILE")"
|
||||
write_log 7 "API response JSON payload: $(cat "$DATFILE")"
|
||||
echo "$(cat "$DATFILE")"
|
||||
}
|
||||
|
||||
# Check Porkbun API response status
|
||||
|
||||
Reference in New Issue
Block a user