mirror of
https://codeberg.org/polyteknisk-radiogruppe/the_prg_server_configuration.git
synced 2026-06-13 18:28:55 +02:00
Added more debugging.
This commit is contained in:
parent
24bb5ddb8c
commit
e90d3d4ac4
1 changed files with 4 additions and 2 deletions
|
|
@ -681,11 +681,13 @@ in {
|
|||
###########################################
|
||||
## Change the IP@Cloudflare using the API
|
||||
###########################################
|
||||
update=$(${pkgs.curl}/bin/curl -s -X PATCH "https://api.cloudflare.com/client/v4/zones/''$zone_identifier/dns_records/''$record_identifier" \
|
||||
update=$(${pkgs.curl}/bin/curl -sS -o - -w '\nHTTP_STATUS:%{http_code}' -X PATCH "https://api.cloudflare.com/client/v4/zones/''$zone_identifier/dns_records/''$record_identifier" \
|
||||
-H "X-Auth-Email: ''$auth_email" \
|
||||
-H "''$auth_header ''$auth_key" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data "{\"type\":\"A\",\"name\":\"''$record_name\",\"content\":\"''$CURRENT_IP\",\"ttl\":''$ttl,\"proxied\":''${proxy}}")
|
||||
--data "{\"type\":\"A\",\"name\":\"''$record_name\",\"content\":\"''$CURRENT_IP\",\"ttl\":''$ttl,\"proxied\":''${proxy}}" 2>&1)
|
||||
CURL_EXIT=$?
|
||||
${pkgs.util-linux}/bin/logger -s "DDNS Updater: Cloudflare PATCH exit=$CURL_EXIT response=$update"
|
||||
|
||||
###########################################
|
||||
## Report the status (simplified payload construction to avoid nested-quote issues)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue