Only include pid when set (#173)

* Now pid is only showing up inside of the nginx config whenever it is set.

Signed-off-by: Niklas Dahmen <n@ni-da.de>

* Update src/nginxconfig/generators/conf/nginx.conf.js

Co-authored-by: Matt (IPv4) Cowley <me@mattcowley.co.uk>
This commit is contained in:
Niklas Dahmen
2020-10-08 16:46:08 +02:00
committed by GitHub
parent 150b42c304
commit 4306666e82

View File

@@ -38,7 +38,8 @@ export default (domains, global) => {
// Basic nginx conf
config.user = global.nginx.user.computed;
config.pid = global.nginx.pid.computed;
if (global.nginx.pid.computed)
config.pid = global.nginx.pid.computed;
config.worker_processes = global.nginx.workerProcesses.computed;
config.worker_rlimit_nofile = 65535;
config.events = {