From 986b2f8da01dc86743cb3c5db68cdb3e5cd0a993 Mon Sep 17 00:00:00 2001 From: Alexandre Bonnetain Date: Mon, 13 Aug 2018 20:25:13 +0000 Subject: [PATCH] Fix archlinux bug with pid Because the pid is set in the service, setting it in the config file result in an error. See https://bugs.archlinux.org/task/46500 --- templates/nginx.conf.j2 | 2 ++ vars/Archlinux.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 7cdec60..ae59f17 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -1,7 +1,9 @@ user {{ nginx_user }}; error_log {{ nginx_error_log }}; +{% if nginx_pidfile %} pid {{ nginx_pidfile }}; +{% endif %} {% block worker %} worker_processes {{ nginx_worker_processes }}; diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml index 593e100..6d9c92b 100644 --- a/vars/Archlinux.yml +++ b/vars/Archlinux.yml @@ -3,7 +3,7 @@ root_group: root nginx_conf_path: /etc/nginx/conf.d nginx_conf_file_path: /etc/nginx/nginx.conf nginx_mime_file_path: /etc/nginx/mime.types -nginx_pidfile: /run/nginx.pid +nginx_pidfile: nginx_vhost_path: /etc/nginx/sites-enabled nginx_default_vhost_path: /etc/nginx/sites-enabled/default __nginx_user: "http"