Add systemd unit for lighttpd
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
c92aacd330
commit
b7eb4104b3
@ -87,13 +87,22 @@ endef
|
|||||||
|
|
||||||
LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
|
LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG
|
||||||
|
|
||||||
define LIGHTTPD_INSTALL_INIT_SCRIPT
|
define LIGHTTPD_INSTALL_INIT_SYSV
|
||||||
[ -f $(TARGET_DIR)/etc/init.d/S50lighttpd ] || \
|
[ -f $(TARGET_DIR)/etc/init.d/S50lighttpd ] || \
|
||||||
$(INSTALL) -D -m 755 package/lighttpd/S50lighttpd \
|
$(INSTALL) -D -m 755 package/lighttpd/S50lighttpd \
|
||||||
$(TARGET_DIR)/etc/init.d/S50lighttpd
|
$(TARGET_DIR)/etc/init.d/S50lighttpd
|
||||||
endef
|
endef
|
||||||
|
|
||||||
LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_INIT_SCRIPT
|
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
|
define LIGHTTPD_UNINSTALL_TARGET_CMDS
|
||||||
$(RM) $(TARGET_DIR)/usr/sbin/lighttpd
|
$(RM) $(TARGET_DIR)/usr/sbin/lighttpd
|
||||||
|
10
package/lighttpd/lighttpd.service
Normal file
10
package/lighttpd/lighttpd.service
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user