main/nginx: pre-install to create /run/nginx v1 PROPOSED

Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s | git am -3
Learn more about email & git

[alpine-aports] [PATCH] main/nginx: pre-install to create /run/nginx Export this patch

Joe Borg
Nginx throws an error, the first time you run it, because the /run/nginx
directory does not exist.  Have added to the pre-install script to create this,
if it doesn't already exist.
 main/nginx/nginx.pre-install | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/main/nginx/nginx.pre-install b/main/nginx/nginx.pre-install
index ae5b685..e30aa2f 100644
--- a/main/nginx/nginx.pre-install
+++ b/main/nginx/nginx.pre-install
@@ -5,4 +5,8 @@ addgroup -S nginx 2>/dev/null
 adduser -S -D -H -h /var/lib/nginx -s /sbin/nologin -G nginx -g nginx nginx 2>/dev/null
 addgroup nginx www-data 2>/dev/null
+if [ ! -d /run/nginx ]; then
+    mkdir /run/nginx
 exit 0

View this thread in the archives