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>
pull/177/head
Niklas Dahmen 2020-10-08 16:46:08 +02:00 committed by GitHub
parent 150b42c304
commit 4306666e82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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 = {