v1.0.0beta17.2

~修复使用在线节点时获取配置文件报错的bug
~修复手动更新订阅界面不显示已保存链接的bug
~下载dashboard面板时,自动检测目录是否可写
This commit is contained in:
juewuy
2020-11-15 13:01:29 +08:00
parent 7e528f5b2b
commit de571b58e3
4 changed files with 34 additions and 39 deletions

View File

@@ -295,18 +295,6 @@ clashlink(){
getlink
elif [ "$num" = 2 ];then
if [ -n "$Url" ];then
echo -----------------------------------------------
echo -e "\033[33m检测到已记录的订阅链接\033[0m"
echo -e "\033[4;32m$Url\033[0m"
echo -----------------------------------------------
read -p "清空链接/追加导入?[1/0] > " res
if [ "$res" = '1' ]; then
Url=""
echo -----------------------------------------------
echo -e "\033[31m链接已清空\033[0m"
fi
fi
getlink2
elif [ "$num" = 3 ];then
@@ -354,7 +342,7 @@ clashlink(){
else
echo -----------------------------------------------
echo -e "\033[33m当前系统记录的订阅链接为\033[0m"
echo -e "\033[4;32m$Url\033[0m"
echo -e "\033[4;32m$Url$Https\033[0m"
echo -----------------------------------------------
read -p "确认更新配置文件?[1/0] > " res
if [ "$res" = '1' ]; then
@@ -600,25 +588,30 @@ getdb(){
errornum
update
fi
echo -----------------------------------------------
echo -e "请选择面板\033[33m安装目录\033[0m"
echo -----------------------------------------------
echo -e " 1 在$clashdir/ui目录安装(推荐安装后会自动重启clash服务)"
echo -e " 2 在/www/clash目录安装(依赖Openwrt的Nginx服务可能失败)"
echo -----------------------------------------------
echo " 0 返回上级菜单"
read -p "请输入对应数字 > " num
if [ -w /www/clash ];then
echo -----------------------------------------------
echo -e "请选择面板\033[33m安装目录\033[0m"
echo -----------------------------------------------
echo -e " 1 在$clashdir/ui目录安装"
echo -e " 2 在/www/clash目录安装(推荐!)"
echo -----------------------------------------------
echo " 0 返回上级菜单"
read -p "请输入对应数字 > " num
if [ -z "$num" ];then
update
elif [ "$num" = '1' ]; then
dbdir=$clashdir/ui
hostdir=":$db_port/ui"
elif [ "$num" = '2' ]; then
if [ -z "$num" ];then
update
elif [ "$num" = '1' ]; then
dbdir=$clashdir/ui
hostdir=":$db_port/ui"
elif [ "$num" = '2' ]; then
dbdir=/www/clash
hostdir='/clash'
else
update
fi
else
dbdir=/www/clash
hostdir='/clash'
else
update
fi
#下载及安装
if [ -d /www/clash -o -d $clashdir/ui ];then