~重写Geo文件检测逻辑

~优化singbox内核本机hosts功能
~修复部分grep相关报错
~优化tar.gz格式内核解压流程
This commit is contained in:
juewuy
2024-02-03 18:55:45 +08:00
parent 9cfa4cb6c6
commit 5ec99ebcff
4 changed files with 35 additions and 95 deletions

View File

@@ -102,7 +102,7 @@ ckstatus(){
#检查执行权限
[ ! -x ${CRASHDIR}/start.sh ] && chmod +x ${CRASHDIR}/start.sh
#检查/tmp内核文件
for file in `ls -F /tmp | grep -v [/\$] | grep -v '\ ' | grep -Ev ".*[(gz)(zip)(7z)(tar)]$" | grep -iE '^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'` ; do
for file in `ls -F /tmp | grep -v [/\$] | grep -v ' ' | grep -Ev ".*[(gz)(zip)(7z)(tar)]$" | grep -iE '^clash$|^clash-linux.*|^mihomo.*|^sing.*box|^clash.meta.*'` ; do
file=/tmp/$file
chmod +x $file
echo -e "发现可用的内核文件: \033[36m$file\033[0m "
@@ -130,7 +130,7 @@ ckstatus(){
echo -----------------------------------------------
done
#检查/tmp配置文件
for file in `ls -F /tmp | grep -v [/\$] | grep -v '\ ' | grep -iE '.yaml$|.yml$|config.json$'` ; do
for file in `ls -F /tmp | grep -v [/\$] | grep -v ' ' | grep -iE '.yaml$|.yml$|config.json$'` ; do
file=/tmp/$file
echo -e "发现内核配置文件: \033[36m$file\033[0m "
read -p "是否加载为$crashcore的配置文件(1/0) > " res