Welcome! Log In Create A New Profile

Advanced

Re: systemd and nginx custom script

Jamie Nguyen
May 16, 2012 04:06PM
On 16 May 2012 18:28, Maxim Dounin <mdounin@mdounin.ru> wrote:
> 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.

No problem.


> 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

Good idea. Done!: http://wiki.nginx.org/FedoraSystemdServiceFile


>> 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.

No problem. I've changed it to:

ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID


> 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).

I've added a comment in the wiki page.


Thanks very much for your advice :-)

Kind regards,
Jamie

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

systemd and nginx custom script

Jamie Nguyen 1538 May 16, 2012 01:02PM

Re: systemd and nginx custom script

Maxim Dounin 775 May 16, 2012 01:30PM

Re: systemd and nginx custom script

Jamie Nguyen 693 May 16, 2012 04:06PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 190
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready