diff options
author | Ole Markus With <olemarkus@gentoo.org> | 2010-10-19 20:07:25 +0000 |
---|---|---|
committer | Ole Markus With <olemarkus@gentoo.org> | 2010-10-19 20:07:25 +0000 |
commit | 03b97a922c9eb0f133559ed3341a57c97ffde7a7 (patch) | |
tree | a0fcd0713ee87dcd8c6e6236ea214309b7b4da28 /dev-lang/php | |
parent | Instill LDFLAGS respect into upstream build system. Closes bug #337449 by Die... (diff) | |
download | gentoo-2-03b97a922c9eb0f133559ed3341a57c97ffde7a7.tar.gz gentoo-2-03b97a922c9eb0f133559ed3341a57c97ffde7a7.tar.bz2 gentoo-2-03b97a922c9eb0f133559ed3341a57c97ffde7a7.zip |
Added fpm init script that works with slotting
(Portage version: 2.1.9.11/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/php')
-rw-r--r-- | dev-lang/php/ChangeLog | 6 | ||||
-rw-r--r-- | dev-lang/php/files/eblits/src_install-v2.eblit | 5 | ||||
-rwxr-xr-x | dev-lang/php/files/php-fpm-r1.init | 33 |
3 files changed, 40 insertions, 4 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index bbf5f84b544b..767f28329f71 100644 --- a/dev-lang/php/ChangeLog +++ b/dev-lang/php/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/php # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.421 2010/10/17 19:23:35 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.422 2010/10/19 20:07:25 olemarkus Exp $ + + 19 Oct 2010; <olemarkus@gentoo.org> files/eblits/src_install-v2.eblit, + +files/php-fpm-r1.init: + Added new fpm.init script that works with minor version slotting 17 Oct 2010; Matti Bickel <mabi@gentoo.org> files/eblits/src_install-v1.eblit, files/eblits/src_install-v2.eblit: diff --git a/dev-lang/php/files/eblits/src_install-v2.eblit b/dev-lang/php/files/eblits/src_install-v2.eblit index 4e4ff2b10c88..63e8808bdaa5 100644 --- a/dev-lang/php/files/eblits/src_install-v2.eblit +++ b/dev-lang/php/files/eblits/src_install-v2.eblit @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit,v 1.4 2010/10/17 19:23:35 mabi Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v2.eblit,v 1.5 2010/10/19 20:07:25 olemarkus Exp $ eblit-php-src_install() { # see bug #324739 for what happens when we don't have that @@ -143,8 +143,7 @@ php_install_ini() { doins "${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm.conf" dodir "/etc/init.d" insinto "/etc/init.d" - newins "${FILESDIR}/php-fpm.init" "php-fpm" - fperms 755 "/etc/init.d/php-fpm" + newinitd "${FILESDIR}/php-fpm-r1.init" "php-fpm" # dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm" fi } diff --git a/dev-lang/php/files/php-fpm-r1.init b/dev-lang/php/files/php-fpm-r1.init new file mode 100755 index 000000000000..508fbe08d013 --- /dev/null +++ b/dev-lang/php/files/php-fpm-r1.init @@ -0,0 +1,33 @@ +#!/sbin/runscript + +PHPSLOT=${SVCNAME#php-fpm-} + +if [[ $PHPSLOT == "php-fpm" ]]; then + PHPSLOT=$(eselect php show fpm) +else + PHPSLOT=php${PHPSLOT} +fi + + +PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf" + + +opts="depend start stop reload" + +depend() { + need net + use apache2 lighttpd nginx +} + +start() { + ebegin "Starting PHP FastCGI server" + start-stop-daemon --start --exec /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" + eend $? +} + +stop() { + ebegin "Stopping PHP FastCGI server" + start-stop-daemon --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm + eend $? +} + |