[oe] [meta-webserver][PATCH 2/2] nginx: make sure the user is correctly set for the volatile directories

Pascal Bach pascal.bach at siemens.com
Tue Mar 21 09:42:51 UTC 2017


Signed-off-by: Pascal Bach <pascal.bach at siemens.com>
---
 meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf | 2 +-
 meta-webserver/recipes-httpd/nginx/nginx.inc                 | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf b/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
index 93f3c66..472fde1 100644
--- a/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx-volatile.conf
@@ -1,2 +1,2 @@
-d www www-data 0755 /run/nginx none
+d @NGINX_USER@ www-data 0755 /run/nginx none
 d root root 0755 /var/log/nginx none
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
index 7f83937..f98f299 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -105,6 +105,7 @@ do_install () {
     install -d ${D}${sysconfdir}/default/volatiles
     install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx
     sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx
+    sed -i 's, at NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
         install -d ${D}${systemd_unitdir}/system
-- 
2.1.4




More information about the Openembedded-devel mailing list