tinyhttpd: systemd support
[Thomas: use relative symlink.] 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
de2dd8f473
commit
b7afea9500
@ -24,4 +24,12 @@ define TINYHTTPD_INSTALL_INIT_SYSV
|
||||
$(TARGET_DIR)/etc/init.d/S85tinyhttpd
|
||||
endef
|
||||
|
||||
define TINYHTTPD_INSTALL_INIT_SYSTEMD
|
||||
$(INSTALL) -D -m 644 package/tinyhttpd/tinyhttpd.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/tinyhttpd.service
|
||||
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
||||
ln -sf ../../../../usr/lib/systemd/system/tinyhttpd.service \
|
||||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/tinyhttpd.service
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
|
10
package/tinyhttpd/tinyhttpd.service
Normal file
10
package/tinyhttpd/tinyhttpd.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Tiny HTTP daemon
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/tinyhttpd
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user