summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-06-04 02:56:20 -0500
committerIndrajit Raychaudhuri <irc@indrajit.com>2023-06-04 03:01:42 -0500
commitb98f38a604954b87c1505bdb6c500a7d6fab983f (patch)
tree6167702abc824d511575bc0934cc05513ca97c2b
parenta79a61b8e3afd39b7faeaca0750e68f3d693c5a9 (diff)
downloadvyos-1x-b98f38a604954b87c1505bdb6c500a7d6fab983f.tar.gz
vyos-1x-b98f38a604954b87c1505bdb6c500a7d6fab983f.zip
dns: T5144: Add pid and cache config as ddclient global
-rw-r--r--data/templates/dns-dynamic/ddclient.conf.j22
-rwxr-xr-xsrc/conf_mode/dns_dynamic.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/data/templates/dns-dynamic/ddclient.conf.j2 b/data/templates/dns-dynamic/ddclient.conf.j2
index 945191bb7..a19b79c00 100644
--- a/data/templates/dns-dynamic/ddclient.conf.j2
+++ b/data/templates/dns-dynamic/ddclient.conf.j2
@@ -26,6 +26,8 @@ if{{ ipv }}={{ address }}, \
daemon=1m
syslog=yes
ssl=yes
+pid={{ config_file | replace('.conf', '.pid') }}
+cache={{ config_file | replace('.conf', '.cache') }}
{% if address is vyos_defined %}
{% for address, service_cfg in address.items() %}
diff --git a/src/conf_mode/dns_dynamic.py b/src/conf_mode/dns_dynamic.py
index e4e2cf30e..d1ac2a08f 100755
--- a/src/conf_mode/dns_dynamic.py
+++ b/src/conf_mode/dns_dynamic.py
@@ -58,6 +58,7 @@ def get_config(config=None):
dyndns['address'][address][svc_type][svc_cfg] = dict_merge(
default_values, dyndns['address'][address][svc_type][svc_cfg])
+ dyndns['config_file'] = config_file
return dyndns
def verify(dyndns):