From c14825f55d286d54ca3c04703ecbded1cb4c2cca Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Sun, 4 Jun 2023 02:27:00 -0500 Subject: dns: T5144: Streamline ddclient systemd service override Templatize systemd override for ddclient service and move the generated override files in /run. This ensures that the override files are always generated afresh after boot. Additionally, simplify the systemd override file by removing the redundant/superfluous overrides. --- src/conf_mode/dns_dynamic.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/conf_mode') diff --git a/src/conf_mode/dns_dynamic.py b/src/conf_mode/dns_dynamic.py index d1ac2a08f..f97225370 100755 --- a/src/conf_mode/dns_dynamic.py +++ b/src/conf_mode/dns_dynamic.py @@ -28,6 +28,7 @@ from vyos import airbag airbag.enable() config_file = r'/run/ddclient/ddclient.conf' +systemd_override = r'/run/systemd/system/ddclient.service.d/override.conf' # Protocols that require zone zone_allowed = ['cloudflare', 'godaddy', 'hetzner', 'gandi', 'nfsn'] @@ -109,6 +110,7 @@ def generate(dyndns): return None render(config_file, 'dns-dynamic/ddclient.conf.j2', dyndns) + render(systemd_override, 'dns-dynamic/override.conf.j2', dyndns) return None def apply(dyndns): -- cgit v1.2.3