mirror of
https://github.com/flucont/btcloud.git
synced 2025-10-15 23:30:29 +00:00
update
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
Linux_Version="11.0.0"
|
Linux_Version="11.0.0"
|
||||||
Windows_Version="8.2.2"
|
Windows_Version="8.2.2"
|
||||||
Aapanel_Version="7.0.21"
|
Aapanel_Version="7.0.21"
|
||||||
Btm_Version="2.3.0"
|
Btm_Version="2.3.1"
|
||||||
|
|
||||||
FILES=(
|
FILES=(
|
||||||
public/install/src/panel6.zip
|
public/install/src/panel6.zip
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<a class="navbar-brand" href="./">宝塔第三方云端管理中心</a>
|
<a class="navbar-brand" href="/admin">宝塔第三方云端管理中心</a>
|
||||||
</div><!-- /.navbar-header -->
|
</div><!-- /.navbar-header -->
|
||||||
<div id="navbar" class="collapse navbar-collapse">
|
<div id="navbar" class="collapse navbar-collapse">
|
||||||
<ul class="nav navbar-nav navbar-right">
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
@@ -411,9 +411,9 @@ EOF
|
|||||||
chmod +x $monitor_path/tools.py
|
chmod +x $monitor_path/tools.py
|
||||||
wget -O /etc/init.d/btm ${download_Url}/init/btmonitor.init -t 5 -T 10
|
wget -O /etc/init.d/btm ${download_Url}/init/btmonitor.init -t 5 -T 10
|
||||||
tmp_size=$(du -b "/etc/init.d/btm"|awk '{print $1}')
|
tmp_size=$(du -b "/etc/init.d/btm"|awk '{print $1}')
|
||||||
if [ ${tmp_size} == 0 ]; then
|
if [ ${tmp_size} == 0 ]; then
|
||||||
\cp -r $monitor_path/init.sh /etc/init.d/btm
|
\cp -r $monitor_path/init.sh /etc/init.d/btm
|
||||||
fi
|
fi
|
||||||
if [ ! -f "/etc/init.d/btm" ];then
|
if [ ! -f "/etc/init.d/btm" ];then
|
||||||
\cp -r $monitor_path/init.sh /etc/init.d/btm
|
\cp -r $monitor_path/init.sh /etc/init.d/btm
|
||||||
fi
|
fi
|
||||||
@@ -450,6 +450,7 @@ Start_Monitor(){
|
|||||||
for ((i=1; i<=5; i++));do
|
for ((i=1; i<=5; i++));do
|
||||||
if [ -z "$password" ]; then
|
if [ -z "$password" ]; then
|
||||||
sleep 7
|
sleep 7
|
||||||
|
rm -f /tmp/bt_monitor.lock
|
||||||
user_pass=`$monitor_path/tools.py create_admin`
|
user_pass=`$monitor_path/tools.py create_admin`
|
||||||
password=`echo $user_pass |awk -F " " '{print $5}'`
|
password=`echo $user_pass |awk -F " " '{print $5}'`
|
||||||
else
|
else
|
||||||
@@ -692,7 +693,7 @@ Get_Pack_Manager(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
Install_RPM_Pack(){
|
Install_RPM_Pack(){
|
||||||
yumPacks="wget curl unzip gcc gcc-c++ make libcurl-devel openssl-devel xz-devel python-backports-lzma xz crontabs zlib zlib-devel sqlite-devel libffi-devel bzip2-devel lsof net-tools"
|
yumPacks="wget curl unzip gcc gcc-c++ make libcurl-devel openssl-devel xz-devel python-backports-lzma xz crontabs zlib zlib-devel sqlite-devel libffi-devel bzip2-devel lsof net-tools p7zip-full"
|
||||||
yum install -y ${yumPacks}
|
yum install -y ${yumPacks}
|
||||||
|
|
||||||
for yumPack in ${yumPacks}
|
for yumPack in ${yumPacks}
|
||||||
@@ -706,7 +707,7 @@ Install_RPM_Pack(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
Install_Deb_Pack(){
|
Install_Deb_Pack(){
|
||||||
debPacks="wget curl unzip gcc g++ make cron libcurl4-openssl-dev libssl-dev liblzma-dev xz-utils libffi-dev libbz2-dev libsqlite3-dev libreadline-dev libgdbm-dev python3-bsddb3 tk-dev ncurses-dev uuid-dev zlib1g zlib1g-dev lsof net-tools";
|
debPacks="wget curl unzip gcc g++ make cron libcurl4-openssl-dev libssl-dev liblzma-dev xz-utils libffi-dev libbz2-dev libsqlite3-dev libreadline-dev libgdbm-dev python3-bsddb3 tk-dev ncurses-dev uuid-dev zlib1g zlib1g-dev lsof net-tools p7zip-full sqlite3";
|
||||||
apt-get update -y
|
apt-get update -y
|
||||||
apt-get install -y $debPacks --force-yes
|
apt-get install -y $debPacks --force-yes
|
||||||
|
|
||||||
@@ -724,64 +725,77 @@ Check_Sys_Write(){
|
|||||||
if [ ! -d "/etc/init.d" ];then
|
if [ ! -d "/etc/init.d" ];then
|
||||||
mkdir -p /etc/init.d
|
mkdir -p /etc/init.d
|
||||||
fi
|
fi
|
||||||
if [ -f /usr/bin/which ];then
|
|
||||||
Get_Pack_Manager
|
|
||||||
if [ "$PM" == "yum" ]; then
|
|
||||||
read_dir="/usr/lib/systemd/system/ /etc/init.d/ /var/spool/cron/"
|
|
||||||
else
|
|
||||||
read_dir="/usr/lib/systemd/system/ /etc/init.d/ /var/spool/cron/crontabs/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for dir in ${read_dir[@]}
|
Get_Pack_Manager
|
||||||
do
|
if [ "$PM" == "yum" ]; then
|
||||||
if [[ -d "$dir" ]]; then
|
read_dir="/usr/lib/systemd/system/ /etc/init.d/ /var/spool/cron/"
|
||||||
touch $dir/btm_install_test_111.pl
|
else
|
||||||
state=$(echo $?)
|
read_dir="/usr/lib/systemd/system/ /etc/init.d/ /var/spool/cron/crontabs/"
|
||||||
if [[ "$state" != "0" ]];then
|
fi
|
||||||
echo -e "\033[31m错误:检测到系统关键目录不可写! $read_dir \033[0m"
|
|
||||||
echo "1、如果安装了[宝塔系统加固],请先临时关闭"
|
touch /tmp/btm_install_test_111.pl
|
||||||
echo "2、如果安装了云锁,请临时关闭[系统加固]功能"
|
for dir in ${read_dir[@]}
|
||||||
echo "3、如果安装了安全狗,请临时关闭[系统防护]功能"
|
do
|
||||||
echo "4、如果使用了其它安全软件,请先卸载 "
|
if [[ -d "$dir" ]]; then
|
||||||
echo -e "5、如果使用了禁止写入命令,请执行命令取消禁止写入:\n chattr -iaR $read_dir "
|
#touch $dir/btm_install_test_111.pl
|
||||||
echo ""
|
if [[ ! -f "/tmp/btm_install_test_111.pl" ]]; then
|
||||||
echo -e "\033[31m解决以上问题后,请尝试重新安装! \033[0m"
|
echo "建立测试 /tmp/btm_install_test_111.pl 文件失败"
|
||||||
echo -e "如果无法解决请截图以上报错信息发帖至论坛www.bt.cn/bbs求助"
|
state=0
|
||||||
exit 1
|
else
|
||||||
else
|
\cp /tmp/btm_install_test_111.pl $dir/btm_install_test_111.pl
|
||||||
rm -f $dir/btm_install_test_111.pl
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
state=$(echo $?)
|
||||||
fi
|
if [[ "$state" != "0" ]];then
|
||||||
|
echo -e "\033[31m错误:检测到系统关键目录不可写! $read_dir \033[0m"
|
||||||
|
echo "1、如果安装了[宝塔系统加固],请先临时关闭"
|
||||||
|
echo "2、如果安装了云锁,请临时关闭[系统加固、文件防护]功能"
|
||||||
|
echo "3、如果安装了安全狗,请临时关闭[系统防护]功能"
|
||||||
|
echo "4、如果使用了其它安全软件,请先卸载 "
|
||||||
|
echo -e "5、如果使用了禁止写入命令,请执行命令取消禁止写入:\n chattr -iaR $read_dir "
|
||||||
|
|
||||||
|
if [ $(whoami) != "root" ];then
|
||||||
|
echo -e "6、检测到非root用户安装,请尝试以下解决方案:\n 1.请切换到root用户安装 \n 2.尝试执行以下安装命令:\n sudo bash $0 $@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e "\033[31m解决以上问题后,请尝试重新安装! \033[0m"
|
||||||
|
echo -e "如果无法解决请截图以上报错信息发帖至论坛www.bt.cn/bbs求助"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
rm -f $dir/btm_install_test_111.pl
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
Check_Sys_Packs(){
|
Check_Sys_Packs(){
|
||||||
echo "正在检查系统中是否存在必备的依赖包"
|
echo "正在检查系统中是否存在必备的依赖包"
|
||||||
Packs="wget curl unzip gcc make"
|
Packs="wget curl unzip gcc make"
|
||||||
for pack in ${Packs[@]}
|
if [ -f /usr/bin/which ];then
|
||||||
do
|
for pack in ${Packs[@]}
|
||||||
check_pack=$(which $pack)
|
do
|
||||||
#echo $check_pack
|
check_pack=$(which $pack)
|
||||||
if [[ "$check_pack" == "" ]]; then
|
#echo $check_pack
|
||||||
echo -e "\033[31mERROR: $pack 命令不存在,尝试以下解决方法:\033[0m"
|
if [[ "$check_pack" == "" ]]; then
|
||||||
if [ "$PM" == "yum" ]; then
|
echo -e "\033[31mERROR: $pack 命令不存在,尝试以下解决方法:\033[0m"
|
||||||
echo 1、使用命令重新安装依赖包:yum reinstall -y ${Packs}
|
if [ "$PM" == "yum" ]; then
|
||||||
else
|
echo 1、使用命令重新安装依赖包:yum reinstall -y ${Packs}
|
||||||
echo 1、使用命令重新安装依赖包:apt-get reinstall -y ${Packs}
|
else
|
||||||
|
echo 1、使用命令重新安装依赖包:apt-get reinstall -y ${Packs}
|
||||||
|
fi
|
||||||
|
echo -e "2、检查系统源是否可用?尝试更换可用的源参考教程:\n https://www.bt.cn/bbs/thread-58005-1-1.html "
|
||||||
|
echo ""
|
||||||
|
echo -e "\033[31m解决以上问题后,请尝试重新安装! \033[0m"
|
||||||
|
echo -e "如果无法解决请截图以上报错信息发帖至论坛www.bt.cn/bbs求助"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo -e "2、检查系统源是否可用?尝试更换可用的源参考教程:\n https://www.bt.cn/bbs/thread-58005-1-1.html "
|
done
|
||||||
echo ""
|
fi
|
||||||
echo -e "\033[31m解决以上问题后,请尝试重新安装! \033[0m"
|
|
||||||
echo -e "如果无法解决请截图以上报错信息发帖至论坛www.bt.cn/bbs求助"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Install_Main(){
|
Install_Main(){
|
||||||
startTime=`date +%s`
|
startTime=`date +%s`
|
||||||
Check_Sys_Write
|
Check_Sys_Write "$@"
|
||||||
System_Check
|
System_Check
|
||||||
Get_Pack_Manager
|
Get_Pack_Manager
|
||||||
get_node_url
|
get_node_url
|
||||||
@@ -870,7 +884,7 @@ done
|
|||||||
if [ "$go" == 'n' ];then
|
if [ "$go" == 'n' ];then
|
||||||
exit;
|
exit;
|
||||||
fi
|
fi
|
||||||
Install_Main
|
Install_Main "$@"
|
||||||
#curl -o /dev/null -fsSL --connect-time 10 "https://api.bt.cn/bt_monitor/setup_count?cloud_type=1&token=$md5_pl&src_code=$1"
|
#curl -o /dev/null -fsSL --connect-time 10 "https://api.bt.cn/bt_monitor/setup_count?cloud_type=1&token=$md5_pl&src_code=$1"
|
||||||
#curl -o /dev/null -fsSL --connect-time 10 "https://api.bt.cn/bt_monitor/setup_count?cloud_type=1&token=$md5_pl&src_code=$1&status=1"
|
#curl -o /dev/null -fsSL --connect-time 10 "https://api.bt.cn/bt_monitor/setup_count?cloud_type=1&token=$md5_pl&src_code=$1&status=1"
|
||||||
|
|
||||||
@@ -890,3 +904,4 @@ echo -e "=================================================================="
|
|||||||
endTime=`date +%s`
|
endTime=`date +%s`
|
||||||
((outTime=($endTime-$startTime)/60))
|
((outTime=($endTime-$startTime)/60))
|
||||||
echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
|
echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
|
||||||
|
rm -f install_btmonitor.sh
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
php think decrypt classdir <面板class_v2文件夹路径>
|
php think decrypt classdir <面板class_v2文件夹路径>
|
||||||
|
|
||||||
- 全局搜索替换 https://wafapi2.aapanel.com => http://www.example.com(需排除task.py、ipsModel.py、js文件)
|
- 全局搜索替换 https://wafapi2.aapanel.com => http://www.example.com(需排除task.py、ipsModel.py、js文件),https://wafapi.aapanel.com => http://www.example.com
|
||||||
|
|
||||||
- 全局搜索替换 https://node.aapanel.com/install/update_7.x_en.sh => http://www.example.com/install/update_7.x_en.sh
|
- 全局搜索替换 https://node.aapanel.com/install/update_7.x_en.sh => http://www.example.com/install/update_7.x_en.sh
|
||||||
|
|
||||||
@@ -22,13 +22,19 @@
|
|||||||
|
|
||||||
- 搜索并删除提交异常报告的代码 bt_error/index.php
|
- 搜索并删除提交异常报告的代码 bt_error/index.php
|
||||||
|
|
||||||
- class/ajax.py 文件 \#是否执行升级程序 下面的 public.get_url() 改成 public.OfficialApiBase()
|
- class/ajax.py、class_v2/ajax_v2.py 文件:
|
||||||
|
|
||||||
class/ajax.py 文件 __official_url = 'https://www.aapanel.com' 改成 http://www.example.com
|
\#是否执行升级程序 下面的 public.get_url() 改成 public.OfficialApiBase()
|
||||||
|
|
||||||
class/jobs.py 文件 \#尝试升级到独立环境 下面的 public.get_url() 改成 public.OfficialApiBase()
|
__official_url = 'https://www.aapanel.com' 改成 http://www.example.com
|
||||||
|
|
||||||
class/system.py 文件 RepPanel和UpdatePro方法内的 public.get_url() 改成 public.OfficialApiBase()
|
class/jobs.py、class_v2/jobs_v2.py 文件:
|
||||||
|
|
||||||
|
\#尝试升级到独立环境 下面的 public.get_url() 改成 public.OfficialApiBase()
|
||||||
|
|
||||||
|
class/system.py、class_v2/system_v2.py 文件:
|
||||||
|
|
||||||
|
RepPanel和UpdatePro方法内的 public.get_url() 改成 public.OfficialApiBase()
|
||||||
|
|
||||||
- class/public/common.py
|
- class/public/common.py
|
||||||
|
|
||||||
@@ -52,7 +58,7 @@
|
|||||||
|
|
||||||
在 def write_request_log(reques=None): 这一行下面加上 return
|
在 def write_request_log(reques=None): 这一行下面加上 return
|
||||||
|
|
||||||
- class/panelPlugin.py 文件,set_pyenv方法内,temp_file = public.readFile(filename)这行代码下面加上
|
- class/panelPlugin.py、class_v2/panel_plugin_v2.py 文件,set_pyenv方法内,temp_file = public.readFile(filename)这行代码下面加上
|
||||||
|
|
||||||
```python
|
```python
|
||||||
temp_file = temp_file.replace('http://download.bt.cn/install/public.sh', 'http://www.example.com/install/public.sh')
|
temp_file = temp_file.replace('http://download.bt.cn/install/public.sh', 'http://www.example.com/install/public.sh')
|
||||||
|
@@ -32,6 +32,8 @@
|
|||||||
|
|
||||||
在 def report_module_logs(self, force=False): 这一行下面加上 return
|
在 def report_module_logs(self, force=False): 这一行下面加上 return
|
||||||
|
|
||||||
|
在 def report_daily_active(self, force=False): 这一行下面加上 return
|
||||||
|
|
||||||
- modules/configModule/main.py
|
- modules/configModule/main.py
|
||||||
|
|
||||||
https://download.bt.cn => http://www.example.com
|
https://download.bt.cn => http://www.example.com
|
||||||
@@ -40,14 +42,4 @@
|
|||||||
|
|
||||||
- init.sh https://download.bt.cn => http://www.example.com
|
- init.sh https://download.bt.cn => http://www.example.com
|
||||||
|
|
||||||
- BT-MONITOR 在
|
- 减少压缩包体积:删除 static/js/ 目录下的map文件
|
||||||
|
|
||||||
```python
|
|
||||||
def CreateSSL():
|
|
||||||
```
|
|
||||||
|
|
||||||
这一行下面加上
|
|
||||||
|
|
||||||
```python
|
|
||||||
return CreateSSL_offline()
|
|
||||||
```
|
|
||||||
|
@@ -14,7 +14,7 @@ def module_run(module_name, def_name, def_args):
|
|||||||
if not os.path.exists(filename):
|
if not os.path.exists(filename):
|
||||||
filename = "{}/plugin/{}/main.py".format(panel_path,module_name)
|
filename = "{}/plugin/{}/main.py".format(panel_path,module_name)
|
||||||
if not os.path.exists(filename):
|
if not os.path.exists(filename):
|
||||||
filename = "{}/plugin/{}Module/{}Plugin.py".format(panel_path,module_name,module_name)
|
filename = "{}/plugin/{}/{}Plugin.py".format(panel_path,module_name,module_name)
|
||||||
if not os.path.exists(filename):
|
if not os.path.exists(filename):
|
||||||
return public.returnMsg(False,'指定模块或插件不存在')
|
return public.returnMsg(False,'指定模块或插件不存在')
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user