From e723719db57f854e533705f7bf12af9f870d20d7 Mon Sep 17 00:00:00 2001 From: Vasily Davydov Date: Tue, 4 Jun 2024 14:43:27 +0300 Subject: [PATCH] services: add more logging to updating_dns --- services/cloudflare_update_dns | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/cloudflare_update_dns b/services/cloudflare_update_dns index ae417a6..f3139bd 100755 --- a/services/cloudflare_update_dns +++ b/services/cloudflare_update_dns @@ -39,10 +39,11 @@ function check_new_ip() { check_new_ip -curl --request PATCH \ +curl_answer="$(curl --request PATCH \ --url "https://api.cloudflare.com/client/v4/zones/${ZONE_ID}/dns_records/${DNS_RECORD}" \ --header 'Content-Type: application/json' \ --header 'X-Auth-Email: ' \ + --silent \ --data '{ "content": "'${CACHED_PUBLIC_IP}'", "name": "tylencloud.com", @@ -51,4 +52,7 @@ curl --request PATCH \ "comment": "Main Record", "ttl": 3600 }' \ --H "Authorization: Bearer ${AUTHORIZATION}"; +-H "Authorization: Bearer ${AUTHORIZATION}")" + +info "${curl_answer}" +"${SEND_TELEGRAM}" "$(echo ${curl_answer} | jq)"