summaryrefslogtreecommitdiffstats
path: root/meta-webserver
diff options
context:
space:
mode:
Diffstat (limited to 'meta-webserver')
-rw-r--r--meta-webserver/recipes-httpd/nginx/files/nginx.service9
-rw-r--r--meta-webserver/recipes-httpd/nginx/nginx.inc5
2 files changed, 8 insertions, 6 deletions
diff --git a/meta-webserver/recipes-httpd/nginx/files/nginx.service b/meta-webserver/recipes-httpd/nginx/files/nginx.service
index 9926a4b9d..ce9906171 100644
--- a/meta-webserver/recipes-httpd/nginx/files/nginx.service
+++ b/meta-webserver/recipes-httpd/nginx/files/nginx.service
@@ -3,10 +3,9 @@ Description=Nginx Server
3After=network.target 3After=network.target
4[Service] 4[Service]
5Type=forking 5Type=forking
6PIDFile=@SYSCONFDIR@/nginx/run/nginx.pid 6PIDFile=/run/nginx/nginx.pid
7ExecStartPre=@BASEBINDIR@/mkdir -p @LOCALSTATEDIR@/log/nginx 7ExecStart=@SBINDIR@/nginx
8ExecStart=@SYSCONFDIR@/init.d/nginx start 8ExecStop=@SBINDIR@/nginx -s stop
9ExecStop=@SYSCONFDIR@/init.d/nginx stop 9ExecReload=@SBINDIR@/nginx -s reload
10[Install] 10[Install]
11WantedBy=multi-user.target 11WantedBy=multi-user.target
12
diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
index fe51ca017..b0d2d9728 100644
--- a/meta-webserver/recipes-httpd/nginx/nginx.inc
+++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
@@ -75,6 +75,8 @@ do_install () {
75 install -d ${D}${sysconfdir}/tmpfiles.d 75 install -d ${D}${sysconfdir}/tmpfiles.d
76 echo "d /run/${BPN} - - - -" \ 76 echo "d /run/${BPN} - - - -" \
77 > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf 77 > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
78 echo "d /${localstatedir}/log/${BPN} 0755 root root -" \
79 >> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
78 fi 80 fi
79 install -d ${D}${sysconfdir}/${BPN} 81 install -d ${D}${sysconfdir}/${BPN}
80 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run 82 ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
@@ -90,6 +92,7 @@ do_install () {
90 install -d ${D}${sysconfdir}/nginx 92 install -d ${D}${sysconfdir}/nginx
91 install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf 93 install -m 0644 ${WORKDIR}/nginx.conf ${D}${sysconfdir}/nginx/nginx.conf
92 sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf 94 sed -i 's,/var/,${localstatedir}/,g' ${D}${sysconfdir}/nginx/nginx.conf
95 sed -i 's/^user.*/user ${NGINX_USER};/g' ${D}${sysconfdir}/nginx/nginx.conf
93 install -d ${D}${sysconfdir}/nginx/sites-enabled 96 install -d ${D}${sysconfdir}/nginx/sites-enabled
94 97
95 install -d ${D}${sysconfdir}/default/volatiles 98 install -d ${D}${sysconfdir}/default/volatiles
@@ -101,7 +104,7 @@ do_install () {
101 install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/ 104 install -m 0644 ${WORKDIR}/nginx.service ${D}${systemd_unitdir}/system/
102 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ 105 sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
103 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ 106 -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
104 -e 's,@BASEBINDIR@,${base_bindir},g' \ 107 -e 's,@SBINDIR@,${sbindir},g' \
105 ${D}${systemd_unitdir}/system/nginx.service 108 ${D}${systemd_unitdir}/system/nginx.service
106 fi 109 fi
107} 110}