diff options
author | Ole Markus With <olemarkus@gentoo.org> | 2011-12-06 12:27:26 +0000 |
---|---|---|
committer | Ole Markus With <olemarkus@gentoo.org> | 2011-12-06 12:27:26 +0000 |
commit | 37ac62ead70dd13bf4f43aa1ed9b2f03a6fe7a7d (patch) | |
tree | 6152740d12a683ff05e2db5210bf44c8ce1cb535 /dev-lang | |
parent | Version bump (diff) | |
download | gentoo-2-37ac62ead70dd13bf4f43aa1ed9b2f03a6fe7a7d.tar.gz gentoo-2-37ac62ead70dd13bf4f43aa1ed9b2f03a6fe7a7d.tar.bz2 gentoo-2-37ac62ead70dd13bf4f43aa1ed9b2f03a6fe7a7d.zip |
Migrated changes from issue 390307
(Portage version: 2.2.0_alpha71/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/php/ChangeLog | 6 | ||||
-rwxr-xr-x | dev-lang/php/files/php-fpm-r4.init | 20 | ||||
-rwxr-xr-x | dev-lang/php/files/php-fpm.init | 47 |
3 files changed, 18 insertions, 55 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog index c795de7d203f..abf2aba4ee80 100644 --- a/dev-lang/php/ChangeLog +++ b/dev-lang/php/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/php # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.523 2011/11/25 09:10:47 olemarkus Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.524 2011/12/06 12:27:26 olemarkus Exp $ + + 06 Dec 2011; Ole Markus With <olemarkus@gentoo.org> -files/php-fpm.init, + files/php-fpm-r4.init: + Migrated changes from issue 390307 *php-5.4.0_rc2 (25 Nov 2011) *php-5.3.9_rc2 (25 Nov 2011) diff --git a/dev-lang/php/files/php-fpm-r4.init b/dev-lang/php/files/php-fpm-r4.init index 249df0f880a4..a186d83478c5 100755 --- a/dev-lang/php/files/php-fpm-r4.init +++ b/dev-lang/php/files/php-fpm-r4.init @@ -1,12 +1,15 @@ #!/sbin/runscript -PHPSLOT="php5.3" +set_phpvars() { + PHPSLOT=${SVCNAME#php-fpm-} + [ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)" -PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf" - -PHP_FPM_PID="/var/run/php-fpm.pid" + PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf" + PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid" +} -opts="depend start stop reload" +extra_commands="depend" +extra_started_commands="reload" depend() { need net @@ -15,8 +18,9 @@ depend() { start() { ebegin "Starting PHP FastCGI Process Manager" + set_phpvars start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \ - /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}" + /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}" local i=0 local timeout=5 while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do @@ -30,12 +34,14 @@ start() { stop() { ebegin "Stopping PHP FastCGI Process Manager" - start-stop-daemon --signal QUIT --stop --exec /usr/bin/php-fpm --pidfile ${PHP_FPM_PID} + set_phpvars + start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID} eend $? } reload() { ebegin "Reloading PHP FastCGI Process Manager" + set_phpvars [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID}) eend $? } diff --git a/dev-lang/php/files/php-fpm.init b/dev-lang/php/files/php-fpm.init deleted file mode 100755 index a186d83478c5..000000000000 --- a/dev-lang/php/files/php-fpm.init +++ /dev/null @@ -1,47 +0,0 @@ -#!/sbin/runscript - -set_phpvars() { - PHPSLOT=${SVCNAME#php-fpm-} - [ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)" - - PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf" - PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid" -} - -extra_commands="depend" -extra_started_commands="reload" - -depend() { - need net - use apache2 lighttpd nginx -} - -start() { - ebegin "Starting PHP FastCGI Process Manager" - set_phpvars - start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \ - /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}" - local i=0 - local timeout=5 - while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do - sleep 1 - i=$(($i + 1)) - done - - [ $timeout -gt $i ] - eend $? -} - -stop() { - ebegin "Stopping PHP FastCGI Process Manager" - set_phpvars - start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID} - eend $? -} - -reload() { - ebegin "Reloading PHP FastCGI Process Manager" - set_phpvars - [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID}) - eend $? -} |