lighttpd: Add systemd support
- Remove dependency on meta-systemd (From OE-Core rev: 36e3d63abaeafc5d2e671bad45b599c159ed10ab) Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c6d25fbd3f
commit
1661f5c90a
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Lightning Fast Webserver With Light System Requirements
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStartPre=@SBINDIR@/lighttpd -t -f @SYSCONFDIR@/lighttpd.conf
|
||||
ExecStart=@SBINDIR@/lighttpd -D -f @SYSCONFDIR@/lighttpd.conf
|
||||
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -22,6 +22,7 @@ SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
|
|||
file://index.html.lighttpd \
|
||||
file://lighttpd.conf \
|
||||
file://lighttpd \
|
||||
file://lighttpd.service \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "8e2d4ae8e918d4de1aeb9842584d170b"
|
||||
|
@ -39,16 +40,25 @@ EXTRA_OECONF = " \
|
|||
--disable-static \
|
||||
"
|
||||
|
||||
inherit autotools pkgconfig update-rc.d gettext
|
||||
inherit autotools pkgconfig update-rc.d gettext systemd
|
||||
|
||||
INITSCRIPT_NAME = "lighttpd"
|
||||
INITSCRIPT_PARAMS = "defaults 70"
|
||||
|
||||
SYSTEMD_SERVICE_${PN} = "lighttpd.service"
|
||||
|
||||
do_install_append() {
|
||||
install -d ${D}${sysconfdir}/init.d ${D}/www/logs ${D}/www/pages/dav ${D}/www/var
|
||||
install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
|
||||
install -m 0755 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
|
||||
install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
|
||||
|
||||
install -d ${D}${systemd_unitdir}/system
|
||||
install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
|
||||
sed -i -e 's,@SBINDIR@,${sbindir},g' \
|
||||
-e 's,@SYSCONFDIR@,${sysconfdir},g' \
|
||||
-e 's,@BASE_BINDIR@,${base_bindir},g' \
|
||||
${D}${systemd_unitdir}/system/lighttpd.service
|
||||
}
|
||||
|
||||
FILES_${PN} += "${sysconfdir} /www"
|
||||
|
|
Loading…
Reference in New Issue