@@ -88,6 +88,17 @@ endef
LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
+define LIGHTTPD_INSTALL_INIT_SYSTEMD
+ [ -f $(TARGET_DIR)/etc/systemd/system/lighttpd.service ] || \
+ $(INSTALL) -D -m 755 package/lighttpd/lighttpd.service \
+ $(TARGET_DIR)/etc/systemd/system/lighttpd.service
+
+ mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+
+ ln -fs ../lighttpd.service \
+ $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service
+endef
+
define LIGHTTPD_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/sbin/lighttpd
rm -f $(TARGET_DIR)/usr/sbin/lighttpd-angel
new file mode 100644
@@ -0,0 +1,10 @@
+[Unit]
+Description=Lighttpd Web Server
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/lighttpd-angel -f /etc/lighttpd/lighttpd.conf -D
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> --- package/lighttpd/lighttpd.mk | 11 +++++++++++ package/lighttpd/lighttpd.service | 10 ++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) create mode 100644 package/lighttpd/lighttpd.service