summaryrefslogtreecommitdiff
path: root/data/templates/dynamic-dns/ddclient.conf.tmpl
blob: 517e4bad418dce9803bb40f32a805cfc0b500082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
### Autogenerated by dynamic_dns.py ###
daemon=1m
syslog=yes
ssl=yes

{% for iface in interface %}
# ddclient configuration for interface "{{ iface }}"
{%   if interface[iface].use_web is defined and interface[iface].use_web is not none %}
{%     set web_skip = ", web-skip='" + interface[iface].use_web.skip + "'" if interface[iface].use_web.skip is defined else '' %}
use=web, web='{{ interface[iface].use_web.url }}'{{ web_skip }}
{%   else %}
{{ 'usev6=if' if interface[iface].ipv6_enable is defined else 'use=if' }}, if={{ iface }}
{%   endif %}

{%   if interface[iface].rfc2136 is defined and interface[iface].rfc2136 is not none %}
{%     for rfc2136, config in interface[iface].rfc2136.items() %}
{%       for dns_record in config.record if config.record is defined %}
# RFC2136 dynamic DNS configuration for {{ rfc2136 }}, {{ config.zone }}, {{ dns_record }}
server={{ config.server }}
protocol=nsupdate
password={{ config.key }}
ttl={{ config.ttl }}
zone={{ config.zone }}
{{ dns_record }}

{%       endfor %}
{%     endfor %}
{%   endif %}

{%   if interface[iface].service is defined and interface[iface].service is not none %}
{%     for service, config in interface[iface].service.items() %}
{%       for dns_record in config.host_name %}
# DynDNS provider configuration for {{ service }}, {{ dns_record }}
protocol={{ config.protocol }},
max-interval=28d,
login={{ config.login }},
password='{{ config.password }}',
{%         if config.server %}
server={{ config.server }},
{%         endif %}
{%         if config.zone %}
zone={{ config.zone }},
{%         endif %}
{{ dns_record }}

{%       endfor %}
{%     endfor %}
{%   endif %}
{% endfor %}