From 9f1e3d64807c0eaf2a9ade1010a8a90e63d719be Mon Sep 17 00:00:00 2001 From: Ermal Date: Sat, 5 Jan 2013 16:38:53 +0000 Subject: Sync rc.php_init_setup with master --- etc/rc.php_ini_setup | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'etc') diff --git a/etc/rc.php_ini_setup b/etc/rc.php_ini_setup index 4d10aef..a7b4357 100755 --- a/etc/rc.php_ini_setup +++ b/etc/rc.php_ini_setup @@ -47,18 +47,9 @@ fi # Calculate APC SHM size according # to detected memory values -if [ "$AVAILMEM" -lt "65" ]; then - APCSHMEMSIZE="1M" -fi -if [ "$AVAILMEM" -lt "96" ]; then - APCSHMEMSIZE="5M" -fi -if [ "$AVAILMEM" -lt "128" ]; then +if [ "$AVAILMEM" -gt "135" ]; then APCSHMEMSIZE="10M" fi -if [ "$AVAILMEM" -gt "128" ]; then - APCSHMEMSIZE="15M" -fi if [ "$AVAILMEM" -gt "256" ]; then APCSHMEMSIZE="20M" fi @@ -69,7 +60,7 @@ if [ "$AVAILMEM" -gt "512" ]; then APCSHMEMSIZE="30M" fi if [ "$AVAILMEM" -gt "784" ]; then - APCSHMEMSIZE="35M" + APCSHMEMSIZE="40M" fi # Set upload directory @@ -81,8 +72,10 @@ fi # Define php modules. Do not add .so, it will # be done automatically by the script below. -PHPMODULES="apc" -PHPMODULES="$PHPMODULES standard" +PHPMODULES="standard" +if [ "$AVAILMEM" -gt "135" ]; then + PHPMODULES="$PHPMODULES apc" +fi # Downloading via HTTP/FTP (pkg mgr, etc) PHPMODULES="$PHPMODULES curl date" # Internationalization @@ -252,7 +245,7 @@ done RAM=`/sbin/sysctl hw.realmem | /usr/bin/awk '{print $2/1000000}' | /usr/bin/awk -F '.' '{print $1}'` export RAM export LOWMEM -if [ "$RAM" -gt 96 ]; then +if [ "$RAM" -gt 135 ]; then /bin/cat >>/usr/local/lib/php.ini <