From ecbfb2500f7588ae35ba43b19b62028a9112ac31 Mon Sep 17 00:00:00 2001 From: midoks Date: Tue, 25 Oct 2022 03:20:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/openresty/install.sh | 9 ++------- plugins/php/versions/53/install.sh | 16 ++++++++-------- plugins/php/versions/54/install.sh | 16 ++++++++-------- plugins/php/versions/55/install.sh | 16 ++++++++-------- plugins/php/versions/56/install.sh | 16 ++++++++-------- plugins/php/versions/70/install.sh | 16 ++++++++-------- plugins/php/versions/71/install.sh | 16 ++++++++-------- plugins/php/versions/72/install.sh | 16 ++++++++-------- plugins/php/versions/73/install.sh | 16 ++++++++-------- plugins/php/versions/74/install.sh | 16 ++++++++-------- plugins/php/versions/80/install.sh | 16 ++++++++-------- plugins/php/versions/81/install.sh | 16 ++++++++-------- plugins/php/versions/82/install.sh | 16 ++++++++-------- 13 files changed, 98 insertions(+), 103 deletions(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 7a1fc76c2..78e4d6b5c 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -35,13 +35,8 @@ Install_openresty() cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi - MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi - else - cpuCore="1" + if [ "$cpuCore" -gt "1" ];then + cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` fi # ----- cpu end ------ diff --git a/plugins/php/versions/53/install.sh b/plugins/php/versions/53/install.sh index b2c66938a..a9f4862eb 100755 --- a/plugins/php/versions/53/install.sh +++ b/plugins/php/versions/53/install.sh @@ -65,14 +65,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/54/install.sh b/plugins/php/versions/54/install.sh index 0e23981f6..14b2c63f1 100755 --- a/plugins/php/versions/54/install.sh +++ b/plugins/php/versions/54/install.sh @@ -57,14 +57,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/55/install.sh b/plugins/php/versions/55/install.sh index e067c6754..15657fb1b 100755 --- a/plugins/php/versions/55/install.sh +++ b/plugins/php/versions/55/install.sh @@ -56,14 +56,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/56/install.sh b/plugins/php/versions/56/install.sh index af7e2ee7e..757962717 100755 --- a/plugins/php/versions/56/install.sh +++ b/plugins/php/versions/56/install.sh @@ -56,14 +56,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/70/install.sh b/plugins/php/versions/70/install.sh index 06c3f9470..74c3493b2 100755 --- a/plugins/php/versions/70/install.sh +++ b/plugins/php/versions/70/install.sh @@ -56,14 +56,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/71/install.sh b/plugins/php/versions/71/install.sh index b4542cb8e..db4af66ac 100755 --- a/plugins/php/versions/71/install.sh +++ b/plugins/php/versions/71/install.sh @@ -53,14 +53,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/72/install.sh b/plugins/php/versions/72/install.sh index e49e08cc2..68c6b2c58 100755 --- a/plugins/php/versions/72/install.sh +++ b/plugins/php/versions/72/install.sh @@ -55,14 +55,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/73/install.sh b/plugins/php/versions/73/install.sh index 3467376c0..3d7ec4024 100755 --- a/plugins/php/versions/73/install.sh +++ b/plugins/php/versions/73/install.sh @@ -69,14 +69,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/74/install.sh b/plugins/php/versions/74/install.sh index 82430997a..8f68710af 100755 --- a/plugins/php/versions/74/install.sh +++ b/plugins/php/versions/74/install.sh @@ -85,14 +85,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/80/install.sh b/plugins/php/versions/80/install.sh index 7a3369448..869683e4e 100755 --- a/plugins/php/versions/80/install.sh +++ b/plugins/php/versions/80/install.sh @@ -76,14 +76,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/81/install.sh b/plugins/php/versions/81/install.sh index 56c4237d4..d48a39c21 100755 --- a/plugins/php/versions/81/install.sh +++ b/plugins/php/versions/81/install.sh @@ -70,14 +70,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'` diff --git a/plugins/php/versions/82/install.sh b/plugins/php/versions/82/install.sh index f199b1b49..f1004623b 100755 --- a/plugins/php/versions/82/install.sh +++ b/plugins/php/versions/82/install.sh @@ -64,14 +64,14 @@ if [ -f /proc/cpuinfo ];then cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l` fi -MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') -if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then - cpuCore="${MEM_INFO}" - fi -else - cpuCore="1" -fi +# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') +# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then +# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then +# cpuCore="${MEM_INFO}" +# fi +# else +# cpuCore="1" +# fi if [ "$cpuCore" -gt "1" ];then cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`