diff options
author | John Klug <john.klug@multitech.com> | 2017-08-14 17:51:05 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-08-14 17:51:05 -0500 |
commit | 8057eeb68f84852e801d8d8dd6d2e3402947060b (patch) | |
tree | 731e7279bd0834fb5b54f15608686f74cb8c1228 /recipes-devtools/php | |
parent | f470ab17fe59bd2242730daa04c6928c50b27a4e (diff) | |
download | meta-mlinux-8057eeb68f84852e801d8d8dd6d2e3402947060b.tar.gz meta-mlinux-8057eeb68f84852e801d8d8dd6d2e3402947060b.tar.bz2 meta-mlinux-8057eeb68f84852e801d8d8dd6d2e3402947060b.zip |
Fix up the php-fpm configuration
Diffstat (limited to 'recipes-devtools/php')
-rw-r--r-- | recipes-devtools/php/files/init.d.php-rpm.patch | 36 | ||||
-rw-r--r-- | recipes-devtools/php/files/php-fpm.conf.patch | 30 | ||||
-rw-r--r-- | recipes-devtools/php/files/php-fpm.default | 2 | ||||
-rw-r--r-- | recipes-devtools/php/php_%.bbappend | 13 |
4 files changed, 81 insertions, 0 deletions
diff --git a/recipes-devtools/php/files/init.d.php-rpm.patch b/recipes-devtools/php/files/init.d.php-rpm.patch new file mode 100644 index 0000000..312f5d7 --- /dev/null +++ b/recipes-devtools/php/files/init.d.php-rpm.patch @@ -0,0 +1,36 @@ +diff -Naru old/sapi/fpm/init.d.php-fpm.in new/sapi/fpm/init.d.php-fpm.in +--- old/sapi/fpm/init.d.php-fpm.in 2017-08-14 16:30:30.551436717 -0500 ++++ new/sapi/fpm/init.d.php-fpm.in 2017-08-14 16:51:21.963399670 -0500 +@@ -10,12 +10,13 @@ + # Description: starts the PHP FastCGI Process Manager daemon + ### END INIT INFO + +-prefix=@prefix@ +-exec_prefix=@exec_prefix@ +- +-php_fpm_BIN=@sbindir@/php-fpm +-php_fpm_CONF=@sysconfdir@/php-fpm.conf +-php_fpm_PID=@localstatedir@/run/php-fpm.pid ++NAME="php-fpm" ++prefix=/usr ++exec_prefix=/usr ++ ++php_fpm_BIN=/usr/sbin/php-fpm ++php_fpm_CONF=/etc/php-fpm.conf ++php_fpm_PID=/var/run/php-fpm.pid + + + php_opts="--fpm-config $php_fpm_CONF --pid $php_fpm_PID" +@@ -52,6 +53,12 @@ + + case "$1" in + start) ++ [[ -f /etc/default/$NAME ]] && . /etc/default/"$NAME" ++ if [[ $ENABLED != "yes" ]]; then ++ echo "$NAME: disabled in /etc/default" ++ exit ++ fi ++ + echo -n "Starting php-fpm " + + $php_fpm_BIN --daemonize $php_opts diff --git a/recipes-devtools/php/files/php-fpm.conf.patch b/recipes-devtools/php/files/php-fpm.conf.patch new file mode 100644 index 0000000..6125b67 --- /dev/null +++ b/recipes-devtools/php/files/php-fpm.conf.patch @@ -0,0 +1,30 @@ +diff -Naru old/php-fpm.conf new/php-fpm.conf +--- old/php-fpm.conf 2017-06-21 12:52:47.597947428 -0500 ++++ new/php-fpm.conf 2017-06-21 13:10:03.225916769 -0500 +@@ -22,7 +22,7 @@ + ; Pid file + ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@ + ; Default Value: none +-;pid = run/php-fpm.pid ++pid = run/php-fpm.pid + + ; Error log file + ; If it's set to "syslog", log is sent to syslogd instead of being written +@@ -161,7 +161,7 @@ + ; (IPv6 and IPv4-mapped) on a specific port; + ; '/path/to/unix/socket' - to listen on a unix socket. + ; Note: This value is mandatory. +-listen = 127.0.0.1:9000 ++listen = /var/run/php-fpm.socket + + ; Set listen(2) backlog. + ; Default Value: 65535 (-1 on FreeBSD and OpenBSD) +@@ -476,7 +476,7 @@ + ; Chdir to this directory at the start. + ; Note: relative path can be used. + ; Default Value: current directory or / when chroot +-;chdir = /var/www ++;chdir = /www + + ; Redirect worker stdout and stderr into main error log. If not set, stdout and + ; stderr will be redirected to /dev/null according to FastCGI specs. diff --git a/recipes-devtools/php/files/php-fpm.default b/recipes-devtools/php/files/php-fpm.default new file mode 100644 index 0000000..0f92640 --- /dev/null +++ b/recipes-devtools/php/files/php-fpm.default @@ -0,0 +1,2 @@ +# set to "yes" or "no" to control starting on boot +ENABLED="no" diff --git a/recipes-devtools/php/php_%.bbappend b/recipes-devtools/php/php_%.bbappend new file mode 100644 index 0000000..004c0f8 --- /dev/null +++ b/recipes-devtools/php/php_%.bbappend @@ -0,0 +1,13 @@ +SRC_URI_append_class-target += "file://php-fpm.conf.patch;patchdir=.. \ + file://init.d.php-rpm.patch \ + file://php-fpm.default \ + " + +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +do_install_append_class-target() { + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/php-fpm.default ${D}/${sysconfdir}/default/php-fpm +} + +FILES_${PN}-fpm += "${sysconfdir}/default"
\ No newline at end of file |