From 3c33359d0c9700a1c80f1a222fe5f43642cd4fde Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 17 Jan 2021 09:44:41 +0100 Subject: ntp: T2185: store configuration in volatile /run area --- data/templates/ntp/override.conf.tmpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'data/templates/ntp/override.conf.tmpl') diff --git a/data/templates/ntp/override.conf.tmpl b/data/templates/ntp/override.conf.tmpl index e0b947686..28eb61b21 100644 --- a/data/templates/ntp/override.conf.tmpl +++ b/data/templates/ntp/override.conf.tmpl @@ -1,11 +1,14 @@ {% set vrf_command = 'ip vrf exec ' + vrf + ' ' if vrf is defined else '' %} [Unit] StartLimitIntervalSec=0 +ConditionPathExists={{config_file}} After=vyos-router.service [Service] ExecStart= -ExecStart={{vrf_command}}/usr/lib/ntp/ntp-systemd-wrapper +ExecStart={{vrf_command}}/usr/sbin/ntpd -g -p {{config_file | replace('.conf', '.pid') }} -c {{config_file}} -u ntp:ntp +PIDFile= +PIDFile={{config_file | replace('.conf', '.pid') }} Restart=always RestartSec=10 -- cgit v1.2.3