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 }