From: Yi Zhao <[email protected]>

Remove directory /var/log/nginx when do_install because it is created by
volatiles file.

Signed-off-by: Yi Zhao <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit 6e9f393605eed1e5f4e317536b1463b83b978bad)
Signed-off-by: Armin Kuster <[email protected]>
---
 meta-webserver/recipes-httpd/nginx/nginx.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc 
b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 2824c66529..de080a2b01 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -90,7 +90,7 @@ do_install () {
         install -d ${D}${sysconfdir}/tmpfiles.d
         echo "d /run/${BPN} - - - -" \
             > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
-        echo "d /${localstatedir}/log/${BPN} 0755 root root -" \
+        echo "d ${localstatedir}/log/${BPN} 0755 root root -" \
             >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
     fi
     install -d ${D}${sysconfdir}/${BPN}
@@ -139,6 +139,8 @@ do_install () {
             -e 's,@BASE_BINDIR@,${base_bindir},g' \
             ${D}${systemd_unitdir}/system/nginx.service
     fi
+
+    rm -rf ${D}${localstatedir}/log/
 }
 
 pkg_postinst_${PN} () {
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#84422): 
https://lists.openembedded.org/g/openembedded-devel/message/84422
Mute This Topic: https://lists.openembedded.org/mt/74292730/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to