On Sun, Oct 27, 2013 at 05:32:48PM +0100, Adrien CLERC wrote:
Package: nginx
Version: 1.4.3-2
Severity: minor
--- Please enter the report below this line. ---
Hi,
In the systemd service file, the two following directive are used:
Type=forking
PIDFile=/run/nginx.pid
However, when running systemd, it's easier to let systemd handle the
PID stuff, and tell the program not to fork itself.
Moreover, we can have a situation when the user changes the PID file
location in the configuration file located at /etc/nginx/nginx.conf
Thus, I recommend removing them, and disabling nginx forking with the
directive "daemon off". See attached unit file.
It is of course opened to discussion. I tried to find any side-effect
of "daemon off", but the documentation doesn't mention any.
This would also break the nginx upgrade mechanism which is used for
package updates (postinst script) in order to upgrade the nginx binary
without dropping connections.
Using the current approach systemd understands that the pid has changed
correctly, probably by monitoring the pid file and the upgrade behaves
as expected. Actually there is a patch that will be included in the next
release that fixes this behaviour. [1]
[0] http://nginx.org/en/docs/control.html "Upgrading Executable on the
Fly" Section
[1]
http://anonscm.debian.org/gitweb/?p=collab-maint/nginx.git;a=commitdiff;h=1e277
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org