diff options
| -rw-r--r-- | meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb b/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb index 06d61c769b..08f53a7d9b 100644 --- a/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb +++ b/meta-webserver/recipes-httpd/nginx/nginx_1.9.9.bb | |||
| @@ -27,6 +27,9 @@ inherit update-rc.d useradd | |||
| 27 | CFLAGS_append = " -fPIE -pie" | 27 | CFLAGS_append = " -fPIE -pie" |
| 28 | CXXFLAGS_append = " -fPIE -pie" | 28 | CXXFLAGS_append = " -fPIE -pie" |
| 29 | 29 | ||
| 30 | NGINX_WWWDIR ?= "${localstatedir}/www/localhost" | ||
| 31 | NGINX_USER ?= "www" | ||
| 32 | |||
| 30 | EXTRA_OECONF = "" | 33 | EXTRA_OECONF = "" |
| 31 | 34 | ||
| 32 | do_configure () { | 35 | do_configure () { |
| @@ -71,9 +74,9 @@ do_install () { | |||
| 71 | fi | 74 | fi |
| 72 | install -d ${D}${sysconfdir}/${BPN} | 75 | install -d ${D}${sysconfdir}/${BPN} |
| 73 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run | 76 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run |
| 74 | install -d ${D}${localstatedir}/www/localhost | 77 | install -d ${D}${NGINX_WWWDIR} |
| 75 | mv ${D}/usr/html ${D}${localstatedir}/www/localhost/ | 78 | mv ${D}/usr/html ${D}${NGINX_WWWDIR}/ |
| 76 | chown www:www-data -R ${D}${localstatedir} | 79 | chown ${NGINX_USER}:www-data -R ${D}${NGINX_WWWDIR} |
| 77 | 80 | ||
| 78 | install -d ${D}${sysconfdir}/init.d | 81 | install -d ${D}${sysconfdir}/init.d |
| 79 | install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx | 82 | install -m 0755 ${WORKDIR}/nginx.init ${D}${sysconfdir}/init.d/nginx |
| @@ -130,6 +133,6 @@ INITSCRIPT_PARAMS = "defaults 92 20" | |||
| 130 | USERADD_PACKAGES = "${PN}" | 133 | USERADD_PACKAGES = "${PN}" |
| 131 | USERADD_PARAM_${PN} = " \ | 134 | USERADD_PARAM_${PN} = " \ |
| 132 | --system --no-create-home \ | 135 | --system --no-create-home \ |
| 133 | --home ${localstatedir}/www/localhost \ | 136 | --home ${NGINX_WWWDIR} \ |
| 134 | --groups www-data \ | 137 | --groups www-data \ |
| 135 | --user-group www" | 138 | --user-group ${NGINX_USER}" |
