From dd159f549db785e260d0a56cc8bd1f3b82625d5d Mon Sep 17 00:00:00 2001 From: chengyechun Date: Tue, 23 May 2023 10:35:06 +0800 Subject: [PATCH] add restart in ntpd.service --- ntp.spec | 8 +++++++- ntpd.service | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ntp.spec b/ntp.spec index ed9dbf0..6f802c5 100644 --- a/ntp.spec +++ b/ntp.spec @@ -2,7 +2,7 @@ Name: ntp Version: 4.2.8p15 -Release: 7 +Release: 8 Summary: A protocol designed to synchronize the clocks of computers over a network License: MIT and BSD and BSD with advertising URL: https://www.ntp.org/ @@ -209,6 +209,12 @@ make check %{_mandir}/man8/*.8* %changelog +* Tue May 23 2023 chengyechun - 4.2.8p15-8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add Restart and conflict service in ntpd.service + * Fri May 12 2023 chengyechun - 4.2.8p15-7 - Type:bugfix - ID:NA diff --git a/ntpd.service b/ntpd.service index a638dad..22e39fe 100644 --- a/ntpd.service +++ b/ntpd.service @@ -1,13 +1,14 @@ [Unit] Description=Network Time Service After=syslog.target ntpdate.service sntp.service -Conflicts=systemd-timesyncd.service +Conflicts=systemd-timesyncd.service chronyd.service [Service] Type=forking EnvironmentFile=-/etc/sysconfig/ntpd ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS PrivateTmp=true +Restart=on-failure [Install] WantedBy=multi-user.target -- Gitee