Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
$(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))
--- /dev/null
+[Unit]
+Description=Task scheduler daemon
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/crond -f -S
+Restart=always
+
+[Install]
+WantedBy=multi-user.target