summaryrefslogtreecommitdiff
path: root/data/templates/ntp
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-01-17 09:44:41 +0100
committerChristian Poessinger <christian@poessinger.com>2021-01-17 10:17:42 +0100
commite3b839a448332119bc40cbc459eaa5d0b9a54a11 (patch)
tree41b82f53a1286347dd315337d661a2ff26e59459 /data/templates/ntp
parent801c523502e5594da4796854d0ea2ecdd2d04958 (diff)
downloadvyos-1x-e3b839a448332119bc40cbc459eaa5d0b9a54a11.tar.gz
vyos-1x-e3b839a448332119bc40cbc459eaa5d0b9a54a11.zip
ntp: T2185: store configuration in volatile /run area
(cherry picked from commit 3c33359d0c9700a1c80f1a222fe5f43642cd4fde)
Diffstat (limited to 'data/templates/ntp')
-rw-r--r--data/templates/ntp/ntpd.conf.tmpl (renamed from data/templates/ntp/ntp.conf.tmpl)0
-rw-r--r--data/templates/ntp/override.conf.tmpl5
2 files changed, 4 insertions, 1 deletions
diff --git a/data/templates/ntp/ntp.conf.tmpl b/data/templates/ntp/ntpd.conf.tmpl
index 2b56b53c3..2b56b53c3 100644
--- a/data/templates/ntp/ntp.conf.tmpl
+++ b/data/templates/ntp/ntpd.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