为适配singbox修改部分变量名及文本

This commit is contained in:
juewuy
2024-01-05 13:24:07 +08:00
parent 1f4deaa2e9
commit 7fc1fa20d8
4 changed files with 58 additions and 45 deletions

View File

@@ -25,14 +25,14 @@ check_update(){ #检查更新工具
update_core(){ #自动更新内核
#检查版本
check_update
clash_v_new=$(eval echo \$${clashcore}_v)
clash_v_new=$(eval echo \$${crashcore}_v)
clash_v_now=$($bindir/clash -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
if [ -z "$clash_v_new" -o "$clash_v_new" = "clash_v_now" ];then
logger "任务【自动更新内核】中止-未检测到版本更新"
exit 1
else
#更新内核
$CRASHDIR/start.sh webget $TMPDIR/clash.new "$update_url/bin/$clashcore/clash-linux-$cpucore"
$CRASHDIR/start.sh webget $TMPDIR/clash.new "$update_url/bin/$crashcore/clash-linux-$cpucore"
if [ "$?" != "0" ];then
logger "任务【自动更新内核】出错-下载失败!"
rm -rf $TMPDIR/clash.new
@@ -44,7 +44,7 @@ update_core(){ #自动更新内核
if [ -z "$clashv" ];then
logger "任务【自动更新内核】出错-下载失败!"
rm -rf $TMPDIR/clash.new
[ $clashcore = meta ] && $CRASHDIR/start.sh start
[ $crashcore = meta ] && $CRASHDIR/start.sh start
return 1
else
mv -f $TMPDIR/clash.new $bindir/clash