dcron: systemd support

Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Alex Suykov 2015-05-23 13:02:32 +03:00 committed by Thomas Petazzoni
parent c6946f24cc
commit 4ab06dd1e9
2 changed files with 18 additions and 0 deletions

View File

@ -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))

View File

@ -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