summaryrefslogtreecommitdiff
path: root/data/templates/dns-dynamic
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2024-01-19 15:33:00 -0600
committerIndrajit Raychaudhuri <irc@indrajit.com>2024-01-21 14:18:07 -0600
commit4476e30007b5b9ea3e929249c47f3ae1c6565784 (patch)
tree0c5d1a88af36a0d8d91ad29c7164342d85d22698 /data/templates/dns-dynamic
parent56dabbfddc6f7d15e27b5293bcf1ed2deb031c38 (diff)
downloadvyos-1x-4476e30007b5b9ea3e929249c47f3ae1c6565784.tar.gz
vyos-1x-4476e30007b5b9ea3e929249c47f3ae1c6565784.zip
ddclient: T5966: Adjust dynamic dns config address subpath
Modify the dynamic dns configuration 'address' subpath for better clarity on how the address is obtained. Additionally, remove `web-options` and fold those options under the path `address web`.
Diffstat (limited to 'data/templates/dns-dynamic')
-rw-r--r--data/templates/dns-dynamic/ddclient.conf.j27
1 files changed, 5 insertions, 2 deletions
diff --git a/data/templates/dns-dynamic/ddclient.conf.j2 b/data/templates/dns-dynamic/ddclient.conf.j2
index 6c0653a55..5538ea56c 100644
--- a/data/templates/dns-dynamic/ddclient.conf.j2
+++ b/data/templates/dns-dynamic/ddclient.conf.j2
@@ -7,7 +7,7 @@ use{{ ipv }}={{ address if address == 'web' else 'if' }}{{ ipv }}, \
web{{ ipv }}={{ web_options.url }}, \
{% endif %}
{% if web_options.skip is vyos_defined %}
-web-skip{{ ipv }}='{{ web_options.skip }}', \
+web{{ ipv }}-skip='{{ web_options.skip }}', \
{% endif %}
{% else %}
if{{ ipv }}={{ address }}, \
@@ -45,9 +45,12 @@ use=no
else ['']) %}
{% set password = config.key if config.protocol == 'nsupdate'
else config.password %}
+{% set address = 'web' if config.address.web is vyos_defined
+ else config.address.interface %}
+{% set web_options = config.address.web | default({}) %}
# Web service dynamic DNS configuration for {{ service }}: [{{ config.protocol }}, {{ host }}]
-{{ render_config(host, config.address, config.web_options, ip_suffixes,
+{{ render_config(host, address, web_options, ip_suffixes,
protocol=config.protocol, server=config.server, zone=config.zone,
login=config.username, password=password, ttl=config.ttl,
min_interval=config.wait_time, max_interval=config.expiry_time) }}