~根据sayo-melu的pr,新增了下载dashboard面板后修改默认host端口为本机端口的功能
~增加了启动clash时对端口占用进行检测的功能
~界面优化
This commit is contained in:
juewuy
2020-08-17 12:44:55 +08:00
parent 8178a577df
commit 9da9606c57
5 changed files with 14 additions and 7 deletions

View File

@@ -443,7 +443,11 @@ if [ "$res" = '1' ]; then
mkdir -p /www/clash > /dev/null
tar -zxvf '/tmp/clashdb.tar.gz' -C /www/clash > /dev/null
[ $? -ne 0 ] && echo "文件解压失败!" && exit 1
echo -e "\033[32m面板安装成功"
#修改默认host和端口
sed -i "s/127.0.0.1/$host/g" /www/clash/js/*.js
sed -i "s/9090/9999/g" /www/clash/js/*.js
#
echo -e "\033[32m面板安装成功\033[0m"
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo -e "\033[36m请使用\033[32;4mhttp://$host/clash\033[0;36m访问面板\033[0m"
rm -rf /tmp/clashdb.tar.gz