Commit 4ab06dd1 authored by Alex Suykov's avatar Alex Suykov Committed by Thomas Petazzoni
Browse files

dcron: systemd support

parent c6946f24
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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))
+10 −0
Original line number Diff line number Diff line
[Unit]
Description=Task scheduler daemon
After=syslog.target

[Service]
ExecStart=/usr/sbin/crond -f -S
Restart=always

[Install]
WantedBy=multi-user.target