From: Alex Suykov Date: Sat, 23 May 2015 10:02:32 +0000 (+0300) Subject: dcron: systemd support X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ab06dd1e95abf1b9c8b0ee38bae25b8a305b5e8;p=buildroot.git dcron: systemd support Signed-off-by: Alex Suykov Signed-off-by: Thomas Petazzoni --- diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk index fcb585d091..840471f5d2 100644 --- a/package/dcron/dcron.mk +++ b/package/dcron/dcron.mk @@ -33,4 +33,12 @@ define DCRON_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/dcron/S90dcron $(TARGET_DIR)/etc/init.d/S90dcron endef +define DCRON_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/dcron/dcron.service \ + $(TARGET_DIR)/usr/lib/systemd/system/dcron.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf /usr/lib/systemd/system/dcron.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dcron.service +endef + $(eval $(generic-package)) diff --git a/package/dcron/dcron.service b/package/dcron/dcron.service new file mode 100644 index 0000000000..b9fa489a49 --- /dev/null +++ b/package/dcron/dcron.service @@ -0,0 +1,10 @@ +[Unit] +Description=Task scheduler daemon +After=syslog.target + +[Service] +ExecStart=/usr/sbin/crond -f -S +Restart=always + +[Install] +WantedBy=multi-user.target