Compare commits

...

3 Commits
2.8 ... 2.9

Author SHA1 Message Date
flucout
a929080b3f update 2024-11-07 15:27:34 +08:00
flucout
ba7e07f18a update 2024-09-27 13:50:20 +08:00
flucout
25292b8e34 update 2024-09-27 13:50:04 +08:00
4 changed files with 41 additions and 2 deletions

View File

@@ -23,6 +23,44 @@ if [ "${is64bit}" != '64' ];then
exit 1
fi
Ready_Check(){
WWW_DISK_SPACE=$(df |grep /www|awk '{print $4}')
ROOT_DISK_SPACE=$(df |grep /$|awk '{print $4}')
if [ "${ROOT_DISK_SPACE}" -le 412000 ];then
df -h
echo -e "系统盘剩余空间不足400M 无法继续安装宝塔面板!"
echo -e "请尝试清理磁盘空间后再重新进行安装"
exit 1
fi
if [ "${WWW_DISK_SPACE}" ] && [ "${WWW_DISK_SPACE}" -le 412000 ] ;then
echo -e "/www盘剩余空间不足400M 无法继续安装宝塔面板!"
echo -e "请尝试清理磁盘空间后再重新进行安装"
exit 1
fi
ROOT_DISK_INODE=$(df -i|grep /$|awk '{print $2}')
if [ "${ROOT_DISK_INODE}" != "0" ];then
ROOT_DISK_INODE_FREE=$(df -i|grep /$|awk '{print $4}')
if [ "${ROOT_DISK_INODE_FREE}" -le 1000 ];then
echo -e "系统盘剩余inodes空间不足1000,无法继续安装!"
echo -e "请尝试清理磁盘空间后再重新进行安装"
exit 1
fi
fi
WWW_DISK_INODE==$(df -i|grep /www|awk '{print $2}')
if [ "${WWW_DISK_INODE}" ] && [ "${WWW_DISK_INODE}" != "0" ] ;then
WWW_DISK_INODE_FREE=$(df -i|grep /www|awk '{print $4}')
if [ "${WWW_DISK_INODE_FREE}" ] && [ "${WWW_DISK_INODE_FREE}" -le 1000 ] ;then
echo -e "/www盘剩余inodes空间不足1000, 无法继续安装!"
echo -e "请尝试清理磁盘空间后再重新进行安装"
exit 1
fi
fi
}
Centos6Check=$(cat /etc/redhat-release | grep ' 6.' | grep -iE 'centos|Red Hat')
if [ "${Centos6Check}" ];then
echo "Centos6不支持安装宝塔面板请更换Centos7/8安装宝塔面板"
@@ -1100,6 +1138,7 @@ Setup_Count(){
echo /www > /var/bt_setupPath.conf
}
Install_Main(){
Ready_Check
#Set_Ssl
startTime=`date +%s`
Lock_Clear

Binary file not shown.

View File

@@ -65,13 +65,13 @@ def plugin_run(plugin_name,def_name,args):
if not hasattr(plugin_obj,def_name):
return public.returnMsg(False,'在[%s]插件中找不到[%s]方法' % (plugin_name,def_name))
if 'plugin_get_object' in args and args.plugin_get_object == 1:
if args is not None and 'plugin_get_object' in args and args.plugin_get_object == 1:
return getattr(plugin_obj, def_name)
# 执行方法
return getattr(plugin_obj,def_name)(args)
else:
if 'plugin_get_object' in args and args.plugin_get_object == 1:
if args is not None and 'plugin_get_object' in args and args.plugin_get_object == 1:
return None
import panelPHP
args.s = def_name