causten | 13cd0ca | 2017-09-26 11:08:47 -0500 | [diff] [blame] | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
| 2 | |
| 3 | inherit systemd |
| 4 | inherit obmc-phosphor-systemd |
| 5 | |
| 6 | SRC_URI += " \ |
| 7 | file://nginx.conf \ |
| 8 | file://nginx.service \ |
| 9 | file://gen-cert.sh \ |
| 10 | " |
| 11 | |
Deepak Kodihalli | ef18a48 | 2018-07-30 03:41:43 -0500 | [diff] [blame] | 12 | EXTRA_OECONF =+ " --without-select_module --with-http_gunzip_module" |
causten | 13cd0ca | 2017-09-26 11:08:47 -0500 | [diff] [blame] | 13 | |
| 14 | SSLCERTPATH = "/etc/ssl/certs/nginx/" |
| 15 | |
| 16 | |
| 17 | do_install_append() { |
| 18 | |
| 19 | install -m 644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx |
| 20 | install -m 0755 ${WORKDIR}/gen-cert.sh ${D}${sbindir}/gen-cert.sh |
| 21 | |
| 22 | install -d ${D}${SSLCERTPATH} |
| 23 | chown -R www:www-data ${D}${SSLCERTPATH} |
| 24 | |
| 25 | |
| 26 | echo SSLCERTPATH |
| 27 | echo ${SSLCERTPATH} |
| 28 | sed -i 's,@CERTPATH@,${SSLCERTPATH},g' ${D}${sysconfdir}/nginx/nginx.conf |
| 29 | } |
| 30 | |
| 31 | FILES_${PN} += " ${SSLCERTPATH} " |
| 32 | |
| 33 | SYSTEMD_SERVICE_${PN} += " nginx.service" |