Skip to contentSkip to conversation

nginx: handle systemd service file

PATCH Superseded Alexandre Belloni 2 participants 3 messages Jan 27, 2017 – Jan 29, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nginx: handle systemd service file

Inherit the systemd class so the service file is properly handled. Note that by default, the service file will be installed but not enabled.

---
 meta-webserver/recipes-httpd/nginx/nginx.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-webserver/recipes-httpd/nginx/nginx.inc +4 -1
index 36f2ac6d71e8..fe943d7c290c 100644
@@ -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"
 
 CFLAGS_append = " -fPIE -pie"
 CXXFLAGS_append = " -fPIE -pie"
Signature · 1 line
2.11.0
#1 lore raw
Quoted 13 lines · Alexandre Belloni

Inherit the systemd class so the service file is properly handled. Note that by default, the service file will be installed but not enabled.

---
 meta-webserver/recipes-httpd/nginx/nginx.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-webserver/recipes-httpd/nginx/nginx.inc +0 -0
index 36f2ac6d71e8..fe943d7c290c 100644

meta-webserver/recipes-httpd/nginx/nginx.inc SRC_URI = " \ · line 26

Quoted 8 lines
meta-webserver/recipes-httpd/nginx/nginx.inc +4 -1
@@ -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.

Quoted 4 lines
meta-webserver/recipes-httpd/nginx/nginx.inc +0 -0
 CFLAGS_append = " -fPIE -pie"
 CXXFLAGS_append = " -fPIE -pie"
 
#2 lore raw
Quoted 19 lines · Khem Raj
Quoted 16 lines · Alexandre Belloni

Inherit the systemd class so the service file is properly handled. Note that by default, the service file will be installed but not enabled.

---
 meta-webserver/recipes-httpd/nginx/nginx.inc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meta-webserver/recipes-httpd/nginx/nginx.inc +0 -0
index 36f2ac6d71e8..fe943d7c290c 100644
@@ -20,7 +20,10 @@ SRC_URI = " \
     file://nginx.service \
 "
 
Quoted 9 lines

meta-webserver/recipes-httpd/nginx/nginx.inc SRC_URI = " \ · line 26

Quoted 5 lines
meta-webserver/recipes-httpd/nginx/nginx.inc +4 -1
-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.

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