提交 a4e83f09 编写于 作者: T Toyo 提交者: GitHub

Add files via upload

上级 2ee219a8
...@@ -5,7 +5,7 @@ export PATH ...@@ -5,7 +5,7 @@ export PATH
#================================================= #=================================================
# System Required: CentOS/Debian/Ubuntu # System Required: CentOS/Debian/Ubuntu
# Description: Brook # Description: Brook
# Version: 1.0.0 # Version: 1.0.1
# Author: Toyo # Author: Toyo
# Blog: https://doub.io/brook-jc3/ # Blog: https://doub.io/brook-jc3/
#================================================= #=================================================
...@@ -78,8 +78,8 @@ Download_brook(){ ...@@ -78,8 +78,8 @@ Download_brook(){
if [ ${bit} == "x86_64" ]; then if [ ${bit} == "x86_64" ]; then
wget --no-check-certificate -N "https://github.com/txthinking/brook/releases/download/${brook_new_ver}/brook" wget --no-check-certificate -N "https://github.com/txthinking/brook/releases/download/${brook_new_ver}/brook"
else else
wget --no-check-certificate -N "https://github.com/txthinking/brook/releases/download/${brook_new_ver}/brook386" wget --no-check-certificate -N "https://github.com/txthinking/brook/releases/download/${brook_new_ver}/brook_linux_386"
mv brook386 brook mv brook_linux_386 brook
fi fi
[[ ! -e "brook" ]] && echo -e "${Error} Brook 下载失败 !" && exit 1 [[ ! -e "brook" ]] && echo -e "${Error} Brook 下载失败 !" && exit 1
chmod +x brook chmod +x brook
...@@ -216,7 +216,6 @@ Set_conf(){ ...@@ -216,7 +216,6 @@ Set_conf(){
} }
Set_brook(){ Set_brook(){
check_installed_status check_installed_status
check_sys
check_pid check_pid
Set_conf Set_conf
Read_config Read_config
...@@ -228,7 +227,6 @@ Set_brook(){ ...@@ -228,7 +227,6 @@ Set_brook(){
} }
Install_brook(){ Install_brook(){
[[ -e ${brook_file} ]] && echo -e "${Error} 检测到 Brook 已安装 !" && exit 1 [[ -e ${brook_file} ]] && echo -e "${Error} 检测到 Brook 已安装 !" && exit 1
check_sys
echo -e "${Info} 开始设置 用户配置..." echo -e "${Info} 开始设置 用户配置..."
Set_conf Set_conf
echo -e "${Info} 开始安装/配置 依赖..." echo -e "${Info} 开始安装/配置 依赖..."
...@@ -270,7 +268,6 @@ Restart_brook(){ ...@@ -270,7 +268,6 @@ Restart_brook(){
} }
Update_brook(){ Update_brook(){
check_installed_status check_installed_status
check_sys
check_new_ver check_new_ver
check_ver_comparison check_ver_comparison
} }
...@@ -285,12 +282,13 @@ Uninstall_brook(){ ...@@ -285,12 +282,13 @@ Uninstall_brook(){
[[ ! -z $PID ]] && kill -9 ${PID} [[ ! -z $PID ]] && kill -9 ${PID}
Read_config Read_config
Del_iptables Del_iptables
rm -rf ${file} && rm -rf /etc/init.d/brook rm -rf ${file}
if [[ ${release} = "centos" ]]; then if [[ ${release} = "centos" ]]; then
chkconfig --del brook chkconfig --del brook
else else
update-rc.d -f brook remove update-rc.d -f brook remove
fi fi
rm -rf /etc/init.d/brook
echo && echo "Brook 卸载完成 !" && echo echo && echo "Brook 卸载完成 !" && echo
else else
echo && echo "卸载已取消..." && echo echo && echo "卸载已取消..." && echo
...@@ -343,6 +341,7 @@ post-down iptables-save > /etc/iptables.up.rules" >> /etc/network/interfaces ...@@ -343,6 +341,7 @@ post-down iptables-save > /etc/iptables.up.rules" >> /etc/network/interfaces
chmod +x /etc/network/interfaces chmod +x /etc/network/interfaces
fi fi
} }
check_sys
echo && echo -e "请输入一个数字来选择选项 echo && echo -e "请输入一个数字来选择选项
${Green_font_prefix}1.${Font_color_suffix} 安装 Brook ${Green_font_prefix}1.${Font_color_suffix} 安装 Brook
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册