From d50e4196cb603cdb9410abb63cbb37a9207b51c7 Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 4 Nov 2022 22:17:57 +0800 Subject: [PATCH] Update install.sh --- plugins/openresty/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 9b16fd507..5829c0987 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -42,6 +42,10 @@ Install_openresty() else cpuCore="1" fi + + if [ "$cpuCore" -gt "1" ];then + cpuCore=`echo "$cpuCore" | awk '{printf("%.2f",($1)*0.8)}' | awk -F '.' '{print $1}'` + fi # ----- cpu end ------ mkdir -p ${openrestyDir} @@ -80,6 +84,7 @@ Install_openresty() #初始化 cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py start cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py initd_install + rm -rf $openrestyDir fi echo '安装完成' > $install_tmp }