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:
parent
c6946f24cc
commit
4ab06dd1e9
@ -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
package/dcron/dcron.service
Normal file
10
package/dcron/dcron.service
Normal 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
|
Loading…
Reference in New Issue
Block a user