mirror of
https://github.com/flucont/btcloud.git
synced 2025-10-18 17:52:04 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
06bf42de98 | ||
![]() |
3c66d2fc7b |
@@ -10,7 +10,7 @@ class Api extends BaseController
|
||||
|
||||
//获取插件列表
|
||||
public function get_plugin_list(){
|
||||
if(!$this->checklist()) return '';
|
||||
if(!$this->checklist()) return json('你的服务器被禁止使用此云端');
|
||||
$record = Db::name('record')->where('ip',$this->clientip)->find();
|
||||
if($record){
|
||||
Db::name('record')->where('id',$record['id'])->update(['usetime'=>date("Y-m-d H:i:s")]);
|
||||
@@ -24,7 +24,7 @@ class Api extends BaseController
|
||||
|
||||
//获取插件列表(win)
|
||||
public function get_plugin_list_win(){
|
||||
if(!$this->checklist()) return '';
|
||||
if(!$this->checklist()) return json('你的服务器被禁止使用此云端');
|
||||
$record = Db::name('record')->where('ip',$this->clientip)->find();
|
||||
if($record){
|
||||
Db::name('record')->where('id',$record['id'])->update(['usetime'=>date("Y-m-d H:i:s")]);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
Linux_Version="8.0.2"
|
||||
Linux_Version="8.0.4"
|
||||
Windows_Version="7.9.0"
|
||||
Btm_Version="2.2.9"
|
||||
|
||||
|
@@ -12,9 +12,9 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
|
||||
('bt_key', ''),
|
||||
('whitelist', '0'),
|
||||
('download_page', '1'),
|
||||
('new_version', '8.0.2'),
|
||||
('new_version', '8.0.4'),
|
||||
('update_msg', '暂无更新日志'),
|
||||
('update_date', '2023-08-28'),
|
||||
('update_date', '2023-11-19'),
|
||||
('new_version_win', '7.9.0'),
|
||||
('update_msg_win', '暂无更新日志'),
|
||||
('update_date_win', '2023-07-20'),
|
||||
|
@@ -30,6 +30,11 @@ if [ "${UbuntuCheck}" ] && [ "${UbuntuCheck}" -lt "16" ];then
|
||||
echo "Ubuntu ${UbuntuCheck}不支持安装宝塔面板,建议更换Ubuntu18/20安装宝塔面板"
|
||||
exit 1
|
||||
fi
|
||||
HOSTNAME_CHECK=$(cat /etc/hostname)
|
||||
if [ -z "${HOSTNAME_CHECK}" ];then
|
||||
echo "当前主机名hostname为空无法安装宝塔面板,请咨询服务器运营商设置好hostname后再重新安装"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ~
|
||||
setup_path="/www"
|
||||
@@ -786,16 +791,14 @@ Set_Bt_Panel(){
|
||||
fi
|
||||
sleep 1
|
||||
admin_auth="/www/server/panel/data/admin_path.pl"
|
||||
if [ "${SAFE_PATH}" ];then
|
||||
auth_path=$SAFE_PATH
|
||||
echo "/${auth_path}" > ${admin_auth}
|
||||
fi
|
||||
if [ ! -f ${admin_auth} ];then
|
||||
auth_path=$(cat /dev/urandom | head -n 16 | md5sum | head -c 8)
|
||||
echo "/${auth_path}" > ${admin_auth}
|
||||
fi
|
||||
auth_path=$(cat /dev/urandom | head -n 16 | md5sum | head -c 8)
|
||||
echo "/${auth_path}" > ${admin_auth}
|
||||
if [ "${SAFE_PATH}" ];then
|
||||
auth_path=$SAFE_PATH
|
||||
echo "/${auth_path}" > ${admin_auth}
|
||||
fi
|
||||
chmod -R 700 $pyenv_path/pyenv/bin
|
||||
btpip install docxtpl==0.16.7
|
||||
/www/server/panel/pyenv/bin/pip3 install pymongo
|
||||
@@ -1059,3 +1062,4 @@ endTime=`date +%s`
|
||||
echo -e "Time consumed:\033[32m $outTime \033[0mMinute!"
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@@ -91,6 +91,7 @@ Route::group('api', function () {
|
||||
Route::get('/panel/notpro', 'api/return_empty');
|
||||
Route::post('/Btdeployment/get_deplist', 'api/get_deplist');
|
||||
Route::post('/panel/get_deplist', 'api/get_deplist');
|
||||
Route::get('/ip/info_json', 'api/return_empty_array');
|
||||
|
||||
Route::post('/LinuxBeta', 'api/return_error');
|
||||
Route::post('/panel/apple_beta', 'api/return_error');
|
||||
|
@@ -16,7 +16,11 @@ def get_plugin_list(force = 0):
|
||||
except Exception as ex:
|
||||
raise public.error_conn_cloud(str(ex))
|
||||
softList = json.loads(jsonData)
|
||||
if type(softList)!=dict or 'list' not in softList: raise Exception('云端插件列表获取失败')
|
||||
if type(softList)!=dict or 'list' not in softList:
|
||||
if type(softList)==str:
|
||||
raise Exception(softList)
|
||||
else:
|
||||
raise Exception('云端插件列表获取失败')
|
||||
public.writeFile(cache_file, jsonData)
|
||||
return softList
|
||||
|
||||
|
@@ -16,7 +16,11 @@ def get_plugin_list(force = 0):
|
||||
except Exception as ex:
|
||||
raise public.error_conn_cloud(str(ex))
|
||||
softList = json.loads(jsonData)
|
||||
if type(softList)!=dict or 'list' not in softList: raise Exception('云端插件列表获取失败')
|
||||
if type(softList)!=dict or 'list' not in softList:
|
||||
if type(softList)==str:
|
||||
raise Exception(softList)
|
||||
else:
|
||||
raise Exception('云端插件列表获取失败')
|
||||
public.writeFile(cache_file, jsonData)
|
||||
return softList
|
||||
|
||||
|
@@ -16,9 +16,11 @@
|
||||
|
||||
- 全局搜索替换 https://www.bt.cn/api/ => http://www.example.com/api/(需排除clearModel.py、scanningModel.py、ipsModel.py)
|
||||
|
||||
- 全局搜索替换 http://www.bt.cn/api/ => http://www.example.com/api/(需排除js文件)
|
||||
|
||||
- 全局搜索替换 https://download.bt.cn/install/update6.sh => http://www.example.com/install/update6.sh
|
||||
|
||||
- class/ajax.py 文件 \#是否执行升级程序 下面的 public.get_url() 改成 public.GetConfigValue('home')
|
||||
- class/ajax.py 文件 \# 是否执行升级程序 下面的 public.get_url() 改成 public.GetConfigValue('home')
|
||||
|
||||
class/jobs.py 文件 \#尝试升级到独立环境 下面的 public.get_url() 改成 public.GetConfigValue('home')
|
||||
|
||||
@@ -63,6 +65,8 @@
|
||||
|
||||
- class/plugin_deployment.py 文件,SetupPackage方法内替换 public.GetConfigValue('home') => 'https://www.bt.cn'
|
||||
|
||||
- script/flush_plugin.py 文件,删除clear_hosts()一行
|
||||
|
||||
- install/install_soft.sh 在bash执行之前加入以下代码
|
||||
|
||||
```shell
|
||||
@@ -97,11 +101,11 @@
|
||||
|
||||
- [可选]去除创建网站自动创建的垃圾文件:在class/panelSite.py,分别删除
|
||||
|
||||
htaccess = self.sitePath+'/.htaccess'
|
||||
htaccess = self.sitePath + '/.htaccess'
|
||||
|
||||
index = self.sitePath+'/index.html'
|
||||
index = self.sitePath + '/index.html'
|
||||
|
||||
doc404 = self.sitePath+'/404.html'
|
||||
doc404 = self.sitePath + '/404.html'
|
||||
|
||||
这3行及分别接下来的4行代码
|
||||
|
||||
|
Reference in New Issue
Block a user