summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Markus With <olemarkus@gentoo.org>2011-04-14 20:31:40 +0000
committerOle Markus With <olemarkus@gentoo.org>2011-04-14 20:31:40 +0000
commit6c10ae1ec1235d28e54b8b6468d9bb6d05fc08ed (patch)
tree761280569175cd88f064b854a93c8021cb682e8b /dev-lang
parentstable ppc, bug 361523 (diff)
downloadgentoo-2-6c10ae1ec1235d28e54b8b6468d9bb6d05fc08ed.tar.gz
gentoo-2-6c10ae1ec1235d28e54b8b6468d9bb6d05fc08ed.tar.bz2
gentoo-2-6c10ae1ec1235d28e54b8b6468d9bb6d05fc08ed.zip
Removed bashism from init script. Bug 349426
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rwxr-xr-xdev-lang/php/files/php-fpm-r3.init15
1 files changed, 4 insertions, 11 deletions
diff --git a/dev-lang/php/files/php-fpm-r3.init b/dev-lang/php/files/php-fpm-r3.init
index e103f7171fbc..6152ac3b681b 100755
--- a/dev-lang/php/files/php-fpm-r3.init
+++ b/dev-lang/php/files/php-fpm-r3.init
@@ -1,13 +1,6 @@
#!/sbin/runscript
-PHPSLOT=${SVCNAME#php-fpm-}
-
-if [[ $PHPSLOT == "php-fpm" ]]; then
- PHPSLOT=$(eselect php show fpm)
-else
- PHPSLOT=php${PHPSLOT}
-fi
-
+PHPSLOT="php5.3"
PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf"
@@ -25,12 +18,12 @@ start() {
start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}"
local i=0
local timeout=5
- while [[ ! -f ${PHP_FPM_PID} ]] && [[ $i -le $timeout ]]; do
+ while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do
sleep 1
i=$(($i + 1))
done
- [[ $timeout -gt $i ]]
+ [ $timeout -gt $i ]
eend $?
}
@@ -42,6 +35,6 @@ stop() {
reload() {
ebegin "Reloading PHP FastCGI Process Manager"
- [[ -f ${PHP_FPM_PID} ]] && kill -USR2 $(cat ${PHP_FPM_PID})
+ [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID})
eend $?
}