From 1cdd8b1c58f549b45c2a8e8165806b8bb798fe03 Mon Sep 17 00:00:00 2001 From: Janusz Dziemidowicz Date: Fri, 25 Sep 2015 15:01:02 +0200 Subject: [PATCH] Fix daemon upgrade when running under systemd Systemd assumes that service of type simple is stopped when the main process exits. This causes systemd to kill all nghttpx processes when doing a process upgrade (via USR2/QUIT signals). Change the service type to forking which behaves correctly on upgrade. --- contrib/nghttpx.service.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/nghttpx.service.in b/contrib/nghttpx.service.in index 9c7f851e..f02fb020 100644 --- a/contrib/nghttpx.service.in +++ b/contrib/nghttpx.service.in @@ -3,8 +3,8 @@ Description=HTTP/2 experimental proxy After=network.target [Service] -Type=simple -ExecStart=@bindir@/nghttpx --errorlog-syslog +Type=forking +ExecStart=@bindir@/nghttpx --conf=/etc/nghttpx/nghttpx.conf --pid-file=/run/nghttpx.pid --daemon [Install] WantedBy=multi-user.target