aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Giraldo <michael.giraldo@gmail.com>2020-11-10 08:15:33 +0000
committerJakub Jirutka <jakub@jirutka.cz>2021-03-09 23:24:28 +0100
commitecf22bca8bd702ecb7312bfa370003db4483754c (patch)
tree6ff7a4db7bd867facd38926609e04b907d917219
parent652bab83409d17f43df159f62bf4da5954cabb7d (diff)
downloadaports-ecf22bca8bd702ecb7312bfa370003db4483754c.tar.gz
aports-ecf22bca8bd702ecb7312bfa370003db4483754c.tar.bz2
aports-ecf22bca8bd702ecb7312bfa370003db4483754c.tar.xz
main/nginx: create pid-dir on install
This will make sure nginx can be started directly in containers, when `/run/*` is persisted and nginx is not started as a service. See !14500
-rw-r--r--main/nginx/nginx.post-install3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/nginx/nginx.post-install b/main/nginx/nginx.post-install
index 70c0812ff6..e249effc77 100644
--- a/main/nginx/nginx.post-install
+++ b/main/nginx/nginx.post-install
@@ -1,5 +1,8 @@
#!/bin/sh
+# This is needed for containers that don't start nginx using init script.
+install -d -m 755 -o nginx -g nginx /run/nginx || true
+
# Install config with the default http server to the new location (since 1.18.0-r13).
if ! [ -e /etc/nginx/http.d/default.conf ]; then
install -m644 /usr/share/nginx/http-default_server.conf /etc/nginx/http.d/default.conf