v1.7.0d
~替换自建源与自建Sub服务器域名 ~修复/tmp目录检测到多个内核或配置文件时跳出的bug ~其他提示相关修复及优化
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -98,9 +98,9 @@ ckstatus(){
|
|||||||
#检查执行权限
|
#检查执行权限
|
||||||
[ ! -x $clashdir/start.sh ] && chmod +x $clashdir/start.sh
|
[ ! -x $clashdir/start.sh ] && chmod +x $clashdir/start.sh
|
||||||
#检查/tmp内核文件
|
#检查/tmp内核文件
|
||||||
for file in /tmp/clash*linux* ; do
|
for file in `find /tmp -name "clash-linux*" -o -name "clash"` ; do
|
||||||
chmod +x $file
|
chmod +x $file
|
||||||
tmp_version=$($file -v)
|
tmp_version=$($file -v 2>/dev/null)
|
||||||
if [ -n "$tmp_version" ];then
|
if [ -n "$tmp_version" ];then
|
||||||
echo -e "\033[32m发现可用的内核文件\033[0m"
|
echo -e "\033[32m发现可用的内核文件\033[0m"
|
||||||
read -p "是否加载?(1/0) > " res
|
read -p "是否加载?(1/0) > " res
|
||||||
@@ -127,15 +127,15 @@ ckstatus(){
|
|||||||
done
|
done
|
||||||
#检查/tmp配置文件
|
#检查/tmp配置文件
|
||||||
[ -x $bindir/clash ] && \
|
[ -x $bindir/clash ] && \
|
||||||
for file in /tmp/clash*linux* ; do
|
for file in `find /tmp -name "*.yaml" -o -name "*.yml"` ; do
|
||||||
$bindir/clash -t -d $bindir -f $file &>/dev/null && {
|
$bindir/clash -t -d $bindir -f $file &>/dev/null && {
|
||||||
echo -e "\033[32m发现可用的YAML配置文件\033[0m"
|
echo -e "\033[32m发现可用的YAML配置文件\033[0m"
|
||||||
echo $file
|
echo $file
|
||||||
read -p "是否加载为config.yaml配置文件?(1/0) > " res
|
read -p "加载为config.yaml配置文件/或者移除该文件?(1/0) > " res
|
||||||
[ "$res" = 1 ] && {
|
[ "$res" = 1 ] && mv -f $file $clashdir/config.yaml
|
||||||
mv -f $file $clashdir/config.yaml
|
[ "$res" = 0 ] && rm -rf $file
|
||||||
}
|
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user