systemd and nginx custom script

Maxim Dounin mdounin at mdounin.ru
Wed May 16 17:28:32 UTC 2012


Hello!

On Wed, May 16, 2012 at 06:01:47PM +0100, Jamie Nguyen wrote:

> Hi, I am co-maintainer for nginx Fedora package. We would like to
> upstream our systemd service file. Could you consider including it in
> the nginx tarball?

We don't usually include any init scripts in distribution and 
usually rely on package mainterners to provide one appropriate for 
a system in question.

If you think the file will be usable for ones who compile 
nginx from source, you may place it here on wiki:

http://wiki.nginx.org/InitScripts

[...]

> ExecReload=/usr/sbin/nginx -s reload
> ExecStop=/usr/sbin/nginx -s quit

Just a side note: using "-s ..." on unix might not be a good idea, 
as it needs nginx binary compatible to one already running to be 
able to parse config for a pid file name and sent appropriate 
signal.  It was introduced mainly for Windows.  On unix-like 
systems it's more fail-safe to explicitly send appropriate 
signals.

Just a side note 2: your service file obviously rely on 
non-default configure arguments, you may want to explicitly state 
this when placing it on wiki (or change the file to match 
defaults).

Maxim Dounin



More information about the nginx-devel mailing list