From 69357d2a62f215fb045fdf192e8bf13ecf89c1fc Mon Sep 17 00:00:00 2001 From: Tine Date: Thu, 2 Jan 2025 17:35:09 +0100 Subject: [PATCH] feat(ingress.tjo.cloud): configure TTL --- ingress.tjo.cloud/root/usr/local/bin/dyndns | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ingress.tjo.cloud/root/usr/local/bin/dyndns b/ingress.tjo.cloud/root/usr/local/bin/dyndns index f972e67..c72c5aa 100755 --- a/ingress.tjo.cloud/root/usr/local/bin/dyndns +++ b/ingress.tjo.cloud/root/usr/local/bin/dyndns @@ -5,6 +5,7 @@ set -euo pipefail api_host="https://api.digitalocean.com/v2" sleep_interval=${SLEEP_INTERVAL:-300} remove_duplicates=${REMOVE_DUPLICATES:-"false"} +record_ttl=${RECORD_TTL:-300} # Only services with ipv6 supported are listed here. # And are not using cloudflare or similar services @@ -66,7 +67,7 @@ configure_record() { # re-enable glob expansion set +f - data="{\"type\": \"$type\", \"name\": \"$sub\", \"data\": \"$ip\"}" + data="{\"type\": \"$type\", \"name\": \"$sub\", \"data\": \"$ip\", \"ttl\": $record_ttl}" url="$dns_list/$record_id" if [[ -z $record_id ]]; then