From 35f37d762648bb921aafd43fb34476c76e4eec91 Mon Sep 17 00:00:00 2001 From: Gustavo Zacarias Date: Tue, 20 Jan 2015 20:31:26 -0300 Subject: [PATCH] openntpd: add systemd unit file Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- package/openntpd/ntpd.service | 11 +++++++++++ package/openntpd/openntpd.mk | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 package/openntpd/ntpd.service diff --git a/package/openntpd/ntpd.service b/package/openntpd/ntpd.service new file mode 100644 index 0000000000..a4ffa7318c --- /dev/null +++ b/package/openntpd/ntpd.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenNTP Daemon +After=network.target +Conflicts=systemd-timesyncd.service + +[Service] +Type=simple +ExecStart=/usr/sbin/ntpd -s -d + +[Install] +WantedBy=multi-user.target diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk index abc75aef8c..a6460cbe57 100644 --- a/package/openntpd/openntpd.mk +++ b/package/openntpd/openntpd.mk @@ -9,6 +9,14 @@ OPENNTPD_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD OPENNTPD_LICENSE = MIT-like, BSD-2c, BSD-3c OPENNTPD_LICENSE_FILES = COPYING +define OPENNTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/openntpd/ntpd.service \ + $(TARGET_DIR)/etc/systemd/system/ntpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../ntpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service +endef + define OPENNTPD_INSTALL_INIT_SYSV $(INSTALL) -m 0755 -D package/openntpd/S49ntp \ $(TARGET_DIR)/etc/init.d/S49ntp -- 2.30.2