summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2024-01-19 15:33:00 -0600
committerIndrajit Raychaudhuri <irc@indrajit.com>2024-02-01 15:43:36 -0600
commit29a43735334d823d89b8ec30a64fb65f5f1a20e2 (patch)
tree91010a7dcfbe42d89afe5e0c82bae8b35d80d180 /data/templates
parentb5a907135ef1943b4dbf8d195cae38cfff360d65 (diff)
downloadvyos-1x-29a43735334d823d89b8ec30a64fb65f5f1a20e2.tar.gz
vyos-1x-29a43735334d823d89b8ec30a64fb65f5f1a20e2.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')
-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) }}