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

tinyhttpd: systemd support



[Thomas: use relative symlink.]

Signed-off-by: default avatarAlex Suykov <alex.suykov@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent de2dd8f4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
[Unit]
Description=Tiny HTTP daemon
After=network.target

[Service]
ExecStart=/usr/sbin/tinyhttpd
Restart=always

[Install]
WantedBy=multi-user.target