summaryrefslogtreecommitdiff
path: root/src/conf_mode/dynamic_dns.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-10-23 06:30:12 -0600
committerChristian Poessinger <christian@poessinger.com>2019-10-23 06:30:12 -0600
commitbbb3a9ecdf2cf76b6336414928030798007dc1c7 (patch)
tree8a140613c7ae35472ccd43143c52e699756c6729 /src/conf_mode/dynamic_dns.py
parent3aadfc1fb0e3af03a98fb908c8709e4099296821 (diff)
downloadvyos-1x-bbb3a9ecdf2cf76b6336414928030798007dc1c7.tar.gz
vyos-1x-bbb3a9ecdf2cf76b6336414928030798007dc1c7.zip
ddclient: T1030: add cloudflare zone config entry
Diffstat (limited to 'src/conf_mode/dynamic_dns.py')
-rwxr-xr-xsrc/conf_mode/dynamic_dns.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/dynamic_dns.py b/src/conf_mode/dynamic_dns.py
index c4a95f5f1..027a7f7e3 100755
--- a/src/conf_mode/dynamic_dns.py
+++ b/src/conf_mode/dynamic_dns.py
@@ -66,6 +66,10 @@ password='{{ srv.password }}',
{% if srv.server -%}
server={{ srv.server }},
{% endif -%}
+{% if 'cloudflare' in srv.protocol -%}
+{% set zone = host.split('.',1) -%}
+zone={{ zone[1] }},
+{% endif -%}
{{ host }}
{% endfor %}
{% endfor %}