~增加内核加载机制,现在只需要将任意内核上传至/tmp后(名称必须包含clash-linux)运行脚本即可自动加载
~增加配置文件加载机制,现在只需要将yaml/yml配置文件上传至/tmp后运行脚本即可自动加载
~修复更新时不显示进度条的bug
~修复dash环境安装后脚本运行出错的bug
This commit is contained in:
juewuy
2023-01-17 19:55:45 +08:00
parent 28dc17cd7e
commit 2b2c18ac99
3 changed files with 62 additions and 32 deletions

View File

@@ -140,9 +140,8 @@ $clashdir/start.sh stop 2>/dev/null #防止进程冲突
}
#移动文件
mkdir -p $clashdir
mv -f /tmp/SC_tmp/* $clashdir
[ -f /tmp/clash-linux* ] && mv -f /tmp/clash-linux* $clashdir/clash
[ -f /tmp/clash ] && mv -f /tmp/clash $clashdir/clash
[ -f /tmp/SC_tmp/* ] && mv -f /tmp/SC_tmp/* $clashdir
#初始化
[ -f "$clashdir/mark" ] || echo '#ShellClash配置文件不明勿动' > $clashdir/mark
#本地安装跳过新手引导
@@ -166,7 +165,8 @@ else
fi
fi
#修饰文件及版本号
bash --help &>/dev/null && sed -i "s|/bin/sh|/bin/bash|" $clashdir/start.sh
type bash &>/dev/null && shtype=bash || shtype=sh
sed -i "s|/bin/sh|/bin/$shtype|" $clashdir/start.sh
chmod 755 $clashdir/start.sh
setconfig versionsh_l $version
#设置更新地址