diff options
Diffstat (limited to 'meta-webserver/recipes-httpd/nginx/nginx.inc')
| -rw-r--r-- | meta-webserver/recipes-httpd/nginx/nginx.inc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc index ea1c1f782a..522942504b 100644 --- a/meta-webserver/recipes-httpd/nginx/nginx.inc +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc | |||
| @@ -16,6 +16,7 @@ SRC_URI = " \ | |||
| 16 | file://nginx-cross.patch \ | 16 | file://nginx-cross.patch \ |
| 17 | file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \ | 17 | file://0001-Allow-the-overriding-of-the-endianness-via-the-confi.patch \ |
| 18 | file://nginx.conf \ | 18 | file://nginx.conf \ |
| 19 | file://default_server.site \ | ||
| 19 | file://nginx.init \ | 20 | file://nginx.init \ |
| 20 | file://nginx-volatile.conf \ | 21 | file://nginx-volatile.conf \ |
| 21 | file://nginx.service \ | 22 | file://nginx.service \ |
| @@ -102,15 +103,28 @@ do_install () { | |||
| 102 | 103 | ||
| 103 | install -d ${D}${sysconfdir}/nginx | 104 | install -d ${D}${sysconfdir}/nginx |
| 104 | install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf | 105 | install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf |
| 106 | sed -i 's,/etc/,${sysconfdir}/,g' ${D}${sysconfdir}/nginx/nginx.conf | ||
| 105 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf | 107 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf |
| 106 | sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf | 108 | sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf |
| 109 | install -Dm 0644 ${WORKDIR}/default_server.site ${D}${sysconfdir}/nginx/sites-available/default_server | ||
| 110 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/sites-available/default_server | ||
| 107 | install -d ${D}${sysconfdir}/nginx/sites-enabled | 111 | install -d ${D}${sysconfdir}/nginx/sites-enabled |
| 112 | ln -s ../sites-available/default_server ${D}${sysconfdir}/nginx/sites-enabled/ | ||
| 108 | 113 | ||
| 109 | install -d ${D}${sysconfdir}/default/volatiles | 114 | install -d ${D}${sysconfdir}/default/volatiles |
| 110 | install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx | 115 | install -m 0644 ${WORKDIR}/nginx-volatile.conf ${D}${sysconfdir}/default/volatiles/99_nginx |
| 111 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx | 116 | sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/default/volatiles/99_nginx |
| 112 | sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx | 117 | sed -i 's,@NGINX_USER@,${NGINX_USER},g' ${D}${sysconfdir}/default/volatiles/99_nginx |
| 113 | 118 | ||
| 119 | # cleanup configuration folder | ||
| 120 | rm ${D}${sysconfdir}/nginx/*.default | ||
| 121 | |||
| 122 | # add additional configuration folders | ||
| 123 | install -d ${D}${sysconfdir}/nginx/modules-available | ||
| 124 | install -d ${D}${sysconfdir}/nginx/modules-enabled | ||
| 125 | install -d ${D}${sysconfdir}/nginx/server-conf.d | ||
| 126 | install -d ${D}${sysconfdir}/nginx/conf.d | ||
| 127 | |||
| 114 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then | 128 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then |
| 115 | install -d ${D}${systemd_unitdir}/system | 129 | install -d ${D}${systemd_unitdir}/system |
| 116 | install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ | 130 | install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ |
