mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
Update install.sh
This commit is contained in:
@@ -81,14 +81,14 @@ Install_mysql()
|
|||||||
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
|
cpuCore=`cat /proc/cpuinfo | grep "processor" | wc -l`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
|
# MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}')
|
||||||
if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
|
# if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then
|
||||||
if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
|
# if [ "${cpuCore}" -gt "${MEM_INFO}" ];then
|
||||||
cpuCore="${MEM_INFO}"
|
# cpuCore="${MEM_INFO}"
|
||||||
fi
|
# fi
|
||||||
else
|
# else
|
||||||
cpuCore="1"
|
# cpuCore="1"
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
if [ "$cpuCore" -gt "1" ];then
|
if [ "$cpuCore" -gt "1" ];then
|
||||||
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
cpuCore=`echo "$cpuCore" | awk '{printf("%.f",($1)*0.8)}'`
|
||||||
|
|||||||
Reference in New Issue
Block a user