* [PATCH] php-fpm: Add support for systemd
@ 2015-05-15 6:45 Alejandro Hernandez
2015-05-15 6:45 ` [meta-oe][PATCH] " Alejandro Hernandez
0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Hernandez @ 2015-05-15 6:45 UTC (permalink / raw)
To: openembedded-devel
Adds suport for systemd, creates a service for php-fpm and installs it if required
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
meta-oe/recipes-devtools/php/php/php-fpm.service | 10 ++++++++++
meta-oe/recipes-devtools/php/php_5.5.24.bb | 13 ++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-devtools/php/php/php-fpm.service
diff --git a/meta-oe/recipes-devtools/php/php/php-fpm.service b/meta-oe/recipes-devtools/php/php/php-fpm.service
new file mode 100644
index 0000000..ac79dc9
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php-fpm.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=PHP-FPM
+After=network.target
+[Service]
+Type=forking
+PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid
+ExecStart=@SYSCONFDIR@/init.d/php-fpm start
+ExecStop=@SYSCONFDIR@/init.d/php-fpm stop
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-devtools/php/php_5.5.24.bb b/meta-oe/recipes-devtools/php/php_5.5.24.bb
index 76185fb..3e656af 100644
--- a/meta-oe/recipes-devtools/php/php_5.5.24.bb
+++ b/meta-oe/recipes-devtools/php/php_5.5.24.bb
@@ -27,6 +27,7 @@ SRC_URI_append_class-target += " \
file://configure.patch \
file://pthread-check-threads-m4.patch \
file://70_mod_php5.conf \
+ file://php-fpm.service \
"
SRC_URI[md5sum] = "f9a8f3e4bb88b33b087bd63732b1402a"
@@ -156,6 +157,16 @@ do_install_append_class-target() {
sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
+ install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
+ ${D}${systemd_unitdir}/system/php-fpm.service
+ fi
+
TMP=`dirname ${D}/${TMPDIR}`
while test ${TMP} != ${D}; do
rmdir ${TMP}
@@ -206,7 +217,7 @@ FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc"
FILES_${PN}-cli = "${bindir}/php"
FILES_${PN}-phar = "${bindir}/phar*"
FILES_${PN}-cgi = "${bindir}/php-cgi"
-FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm"
+FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service"
FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf"
CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [meta-oe][PATCH] php-fpm: Add support for systemd
2015-05-15 6:45 [PATCH] php-fpm: Add support for systemd Alejandro Hernandez
@ 2015-05-15 6:45 ` Alejandro Hernandez
0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Hernandez @ 2015-05-15 6:45 UTC (permalink / raw)
To: openembedded-devel
Adds suport for systemd, creates a service for php-fpm and installs it if required
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
---
meta-oe/recipes-devtools/php/php/php-fpm.service | 10 ++++++++++
meta-oe/recipes-devtools/php/php_5.5.24.bb | 13 ++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-devtools/php/php/php-fpm.service
diff --git a/meta-oe/recipes-devtools/php/php/php-fpm.service b/meta-oe/recipes-devtools/php/php/php-fpm.service
new file mode 100644
index 0000000..ac79dc9
--- /dev/null
+++ b/meta-oe/recipes-devtools/php/php/php-fpm.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=PHP-FPM
+After=network.target
+[Service]
+Type=forking
+PIDFile=@LOCALSTATEDIR@/run/php-fpm.pid
+ExecStart=@SYSCONFDIR@/init.d/php-fpm start
+ExecStop=@SYSCONFDIR@/init.d/php-fpm stop
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-oe/recipes-devtools/php/php_5.5.24.bb b/meta-oe/recipes-devtools/php/php_5.5.24.bb
index 76185fb..3e656af 100644
--- a/meta-oe/recipes-devtools/php/php_5.5.24.bb
+++ b/meta-oe/recipes-devtools/php/php_5.5.24.bb
@@ -27,6 +27,7 @@ SRC_URI_append_class-target += " \
file://configure.patch \
file://pthread-check-threads-m4.patch \
file://70_mod_php5.conf \
+ file://php-fpm.service \
"
SRC_URI[md5sum] = "f9a8f3e4bb88b33b087bd63732b1402a"
@@ -156,6 +157,16 @@ do_install_append_class-target() {
sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm
sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm
install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm
+ install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/php-fpm.service ${D}${systemd_unitdir}/system/
+ sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \
+ -e 's,@LOCALSTATEDIR@,${localstatedir},g' \
+ ${D}${systemd_unitdir}/system/php-fpm.service
+ fi
+
TMP=`dirname ${D}/${TMPDIR}`
while test ${TMP} != ${D}; do
rmdir ${TMP}
@@ -206,7 +217,7 @@ FILES_${PN}-doc += "${PHP_LIBDIR}/php/doc"
FILES_${PN}-cli = "${bindir}/php"
FILES_${PN}-phar = "${bindir}/phar*"
FILES_${PN}-cgi = "${bindir}/php-cgi"
-FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm"
+FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm ${systemd_unitdir}/system/php-fpm.service"
FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf"
CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf"
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-15 6:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 6:45 [PATCH] php-fpm: Add support for systemd Alejandro Hernandez
2015-05-15 6:45 ` [meta-oe][PATCH] " Alejandro Hernandez
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.