summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-06-04 02:27:00 -0500
committerIndrajit Raychaudhuri <irc@indrajit.com>2023-06-04 03:59:49 -0500
commitc14825f55d286d54ca3c04703ecbded1cb4c2cca (patch)
tree66a4da93ed5779a32c1f9a0410849c2626ced799 /data/templates
parentb98f38a604954b87c1505bdb6c500a7d6fab983f (diff)
downloadvyos-1x-c14825f55d286d54ca3c04703ecbded1cb4c2cca.tar.gz
vyos-1x-c14825f55d286d54ca3c04703ecbded1cb4c2cca.zip
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.
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/dns-dynamic/override.conf.j211
1 files changed, 11 insertions, 0 deletions
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 }}