This commit is contained in:
flucont 2023-04-14 20:01:12 +08:00
parent 5d305b47de
commit 9a63bc921b
6 changed files with 32 additions and 23 deletions

View File

@ -2,7 +2,7 @@
Linux_Version="7.9.9" Linux_Version="7.9.9"
Windows_Version="7.8.0" Windows_Version="7.8.0"
Btm_Version="2.0.9" Btm_Version="2.1.1"
FILES=( FILES=(
public/install/src/panel6.zip public/install/src/panel6.zip

View File

@ -18,7 +18,7 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
('new_version_win', '7.8.0'), ('new_version_win', '7.8.0'),
('update_msg_win', '暂无更新日志'), ('update_msg_win', '暂无更新日志'),
('update_date_win', '2022-12-08'), ('update_date_win', '2022-12-08'),
('new_version_btm', '2.0.8'), ('new_version_btm', '2.1.1'),
('update_msg_btm', '暂无更新日志'), ('update_msg_btm', '暂无更新日志'),
('update_date_btm', '2023-03-31'), ('update_date_btm', '2023-03-31'),
('updateall_type', '0'), ('updateall_type', '0'),

View File

@ -462,16 +462,24 @@ Start_Monitor(){
curl -sSO ${download_Url}/install/btmonitoragent.sh && bash btmonitoragent.sh https://127.0.0.1:806 $md5_pl curl -sSO ${download_Url}/install/btmonitoragent.sh && bash btmonitoragent.sh https://127.0.0.1:806 $md5_pl
target_dir="/usr/local/btmonitoragent" target_dir="/usr/local/btmonitoragent"
if [ ! -f "$target_dir/BT-MonitorAgent" ];then if [ ! -f "$target_dir/BT-MonitorAgent" ];then
echo "ERROR: 安装云监控被控端失败,正在尝试重新安装!" tail -n 10 ${monitor_path}/logs/error.log
echo ""
ps aux|grep -v grep|grep ${monitor_path}
netstat -tulnp|grep ${panelPort}
/etc/init.d/btm restart
if [ "$?" -eq 0 ]; then
echo -e "\033[31m安装云监控被控端失败正在尝试重新安装\033[0m"
sleep 15
curl -sSO ${download_Url}/install/btmonitoragent.sh && bash btmonitoragent.sh https://127.0.0.1:806 $md5_pl curl -sSO ${download_Url}/install/btmonitoragent.sh && bash btmonitoragent.sh https://127.0.0.1:806 $md5_pl
if [ ! -f "$target_dir/BT-MonitorAgent" ];then if [ ! -f "$target_dir/BT-MonitorAgent" ];then
Red_Error "ERROR: 安装云监控被控端失败,请尝试重新安装!" Red_Error "ERROR: 安装云监控被控端失败,请尝试重新安装!"
fi fi
else
Red_Error "ERROR: 安装云监控被控端失败,请尝试重新安装!"
fi
fi fi
/etc/init.d/btm restart > /dev/null 2>&1 /etc/init.d/btm restart > /dev/null 2>&1
} }
Set_Firewall(){ Set_Firewall(){
@ -708,9 +716,9 @@ Check_Sys_Write(){
for dir in ${read_dir[@]} for dir in ${read_dir[@]}
do do
if [[ -d "$dir" ]]; then
touch $dir/btm_install_test_111.pl touch $dir/btm_install_test_111.pl
state=$(echo $?) state=$(echo $?)
#echo $state
if [[ "$state" != "0" ]];then if [[ "$state" != "0" ]];then
echo -e "\033[31m错误检测到系统关键目录不可写! $read_dir \033[0m" echo -e "\033[31m错误检测到系统关键目录不可写! $read_dir \033[0m"
echo "1、如果安装了[宝塔系统加固],请先临时关闭" echo "1、如果安装了[宝塔系统加固],请先临时关闭"
@ -725,6 +733,7 @@ Check_Sys_Write(){
else else
rm -f $dir/btm_install_test_111.pl rm -f $dir/btm_install_test_111.pl
fi fi
fi
done done
fi fi
} }

Binary file not shown.