summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb')
-rw-r--r--meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb
index 9b80bbff67..a7083d80e9 100644
--- a/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb
+++ b/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2_2.4.43.bb
@@ -20,7 +20,9 @@ SRC_URI = "${APACHE_MIRROR}/httpd/httpd-${PV}.tar.bz2 \
SRC_URI_append_class-target = " \
file://0008-apache2-do-not-use-relative-path-for-gen_test_char.patch \
file://init \
+ file://apache2-volatile.conf \
file://apache2.service \
+ file://volatiles.04_apache2 \
"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bddeddfac80b2c9a882241d008bb41c3"
@@ -126,10 +128,16 @@ do_install_append_class-target() {
-e 's,".*/configure","configure",g' ${D}${datadir}/apache2/build/config.nice
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/tmpfiles.d/
+ install -m 0644 ${WORKDIR}/apache2-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/apache2.service ${D}${systemd_unitdir}/system
sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/apache2.service
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' ${D}${systemd_unitdir}/system/apache2.service
+ elif ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d ${D}${sysconfdir}/default/volatiles
+ install -m 0644 ${WORKDIR}/volatiles.04_apache2 ${D}${sysconfdir}/default/volatiles/04_apache2
fi
rm -rf ${D}${localstatedir} ${D}${sbindir}/envvars*
@@ -206,3 +214,13 @@ RDEPENDS_${PN}-scripts += "perl ${PN}"
RDEPENDS_${PN}-dev = "perl"
BBCLASSEXTEND = "native"
+
+pkg_postinst_${PN}() {
+ if [ -z "$D" ]; then
+ if type systemd-tmpfiles >/dev/null; then
+ systemd-tmpfiles --create
+ elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+ ${sysconfdir}/init.d/populate-volatile.sh update
+ fi
+ fi
+}