summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-10-23 06:30:12 -0600
committerChristian Poessinger <christian@poessinger.com>2019-11-09 15:16:18 +0100
commit25ffe3c8249f5977ca93ef2551c954d043d44bb0 (patch)
treee6925ad0d20072f841308404a91c439c79990936 /src/conf_mode
parent4500e38703c444ecd4964068ee7dbb91cec1e523 (diff)
downloadvyos-1x-25ffe3c8249f5977ca93ef2551c954d043d44bb0.tar.gz
vyos-1x-25ffe3c8249f5977ca93ef2551c954d043d44bb0.zip
ddclient: T1030: add cloudflare zone config entry
(cherry picked from commit bbb3a9ecdf2cf76b6336414928030798007dc1c7)
Diffstat (limited to 'src/conf_mode')
-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 %}