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. --- data/templates/dns-dynamic/override.conf.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 data/templates/dns-dynamic/override.conf.j2 (limited to 'data/templates/dns-dynamic/override.conf.j2') diff --git a/data/templates/dns-dynamic/override.conf.j2 b/data/templates/dns-dynamic/override.conf.j2 new file mode 100644 index 000000000..8a9dfcd70 --- /dev/null +++ b/data/templates/dns-dynamic/override.conf.j2 @@ -0,0 +1,11 @@ +{% set vrf_command = 'ip vrf exec ' ~ vrf ~ ' ' if vrf is vyos_defined else '' %} +[Unit] +ConditionPathExists={{ config_file }} +After=vyos-router.service + +[Service] +PIDFile= +PIDFile={{ config_file | replace('.conf', '.pid') }} +EnvironmentFile= +ExecStart= +ExecStart=/usr/bin/ddclient -file {{ config_file }} -- cgit v1.2.3