[oe] [PATCH][meta-webserver] nginx: handle systemd service file

Alexandre Belloni alexandre.belloni at free-electrons.com
Sun Jan 29 02:00:32 UTC 2017


On 27/01/2017 at 11:14:41 -0800, Khem Raj wrote:
> 
> 
> On 1/27/17 11:06 AM, Alexandre Belloni wrote:
> > Inherit the systemd class so the service file is properly handled.
> > Note that by default, the service file will be installed but not enabled.
> > 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
> > ---
> >  meta-webserver/recipes-httpd/nginx/nginx.inc | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta-webserver/recipes-httpd/nginx/nginx.inc b/meta-webserver/recipes-httpd/nginx/nginx.inc
> > index 36f2ac6d71e8..fe943d7c290c 100644
> > --- a/meta-webserver/recipes-httpd/nginx/nginx.inc
> > +++ b/meta-webserver/recipes-httpd/nginx/nginx.inc
> > @@ -20,7 +20,10 @@ SRC_URI = " \
> >      file://nginx.service \
> >  "
> >  
> > -inherit update-rc.d useradd
> > +inherit update-rc.d useradd systemd
> > +
> > +SYSTEMD_SERVICE_${PN} = "nginx.service"
> > +SYSTEMD_AUTO_ENABLE_${PN} = "disable"
> 
> why disabled by default if someone is including nginx he/she might be
> interested in using it.
> 

I mimicked what is done for apache2. I would also prefer that it is
started automatically when selected. I simply didn't know what was the
preference for meta-webserver.

I'll resend without disabling if that is fine for everybody.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the Openembedded-devel mailing list