summaryrefslogtreecommitdiff
path: root/recipes-core/lighttpd/lighttpd_1.4.48.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/lighttpd/lighttpd_1.4.48.bb')
-rw-r--r--recipes-core/lighttpd/lighttpd_1.4.48.bb13
1 files changed, 10 insertions, 3 deletions
diff --git a/recipes-core/lighttpd/lighttpd_1.4.48.bb b/recipes-core/lighttpd/lighttpd_1.4.48.bb
index efb10df..38341d6 100644
--- a/recipes-core/lighttpd/lighttpd_1.4.48.bb
+++ b/recipes-core/lighttpd/lighttpd_1.4.48.bb
@@ -26,6 +26,7 @@ RDEPENDS_${PN} += " openssl"
SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.gz \
file://lighttpd.conf \
file://lighttpd.init \
+ file://lighttpd.service \
file://0001-lighttpd-pcre-use-pkg-config.patch;apply=true \
file://0004_fastcgi_env_with_unixsocket.patch;apply=true \
"
@@ -48,10 +49,10 @@ EXTRA_OECONF = " \
--disable-static \
"
-inherit useradd autotools pkgconfig gettext systemd
+inherit useradd update-rc.d autotools pkgconfig gettext systemd
INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 60 40"
+INITSCRIPT_PARAMS = "defaults 70"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system --gid 667 www"
@@ -63,7 +64,13 @@ do_install_append() {
install -m 0755 --group www -d ${D}${localstatedir}/www
install -m 0755 ${WORKDIR}/lighttpd.init ${D}${sysconfdir}/init.d/lighttpd
install -m 0644 --group www ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
-
+
+ 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
#For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
ln -sf ${localstatedir}/log ${D}/www/logs
ln -sf ${localstatedir}/tmp ${D}/www/var