~修复部分linux设备使用meta内核开机自启后无法正确还原面板节点及配置的问题
~修复使用clash内核启用域名嗅探后,因未能正确切换内核而导致的启动失败
~修复卸载后部分定时任务未能正确移除的bug
~修复下载或更新meta内核时的显示bug
This commit is contained in:
juewuy
2024-01-26 14:11:04 +08:00
parent 973900c52e
commit 7d0310c263
8 changed files with 13 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -5,4 +5,4 @@ meta_v=v1.18.0
singbox_v=1.7.8
GeoIP_v=20240120
versionsh=1.8.8e
versionsh=1.8.8f

View File

@@ -904,7 +904,7 @@ getcore(){
if [ "$crashcore" = singbox ];then
core_v=$(${TMPDIR}/core.new version 2>/dev/null | grep version | awk '{print $3}')
else
core_v=$(${TMPDIR}/core.new -v 2>/dev/null | grep linux | sed 's/ linux.*//;s/.* //')
core_v=$(${TMPDIR}/core.new -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
fi
if [ -z "$core_v" ];then
echo -e "\033[31m核心文件下载成功但校验失败请尝试手动指定CPU版本\033[0m"

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.8.8e
version=1.8.8f
setdir(){
dir_avail(){

View File

@@ -1466,7 +1466,7 @@ advanced_set(){ #进阶设置
echo -----------------------------------------------
if [ "$sniffer" = "未启用" ];then
if [ "$crashcore" = "clash" ];then
rm -rf ${BINDIR}/clash
rm -rf ${BINDIR}/CrashCore
crashcore=meta
setconfig crashcore $crashcore
echo "已将ShellCrash内核切换为Meta内核域名嗅探依赖Meta或者高版本clashpre内核"
@@ -1562,6 +1562,7 @@ uninstall(){
${CRASHDIR}/start.sh cronset "clash服务" 2>/dev/null
${CRASHDIR}/start.sh cronset "订阅链接" 2>/dev/null
${CRASHDIR}/start.sh cronset "ShellCrash初始化" 2>/dev/null
${CRASHDIR}/start.sh cronset "task.sh" 2>/dev/null
read -p "是否保留脚本配置及订阅文件?[1/0] > " res
if [ "$res" = '1' ]; then
mv -f ${CRASHDIR}/configs /tmp/ShellCrash

View File

@@ -1324,9 +1324,9 @@ web_restore(){ #还原面板选择
while [ -z "$test" -a "$i" -lt 20 ];do
sleep 2
if curl --version > /dev/null 2>&1;then
test=$(curl -s http://127.0.0.1:${db_port})
test=$(curl -s http://127.0.0.1:${db_port}/configs | grep -o port)
else
test=$(wget -q -O - http://127.0.0.1:${db_port})
test=$(wget -q -O - http://127.0.0.1:${db_port}/configs | grep -o port)
fi
i=$((i+1))
done
@@ -1342,7 +1342,10 @@ web_restore(){ #还原面板选择
done
}
#还原面板设置
[ "$crashcore" != singbox ] && [ -s ${CRASHDIR}/configs/web_configs ] && put_save http://127.0.0.1:${db_port}/configs "$(cat ${CRASHDIR}/configs/web_configs)" PATCH
[ "$crashcore" != singbox ] && [ -s ${CRASHDIR}/configs/web_configs ] {
sleep 5
put_save http://127.0.0.1:${db_port}/configs "$(cat ${CRASHDIR}/configs/web_configs)" PATCH
}
}
makehtml(){ #生成面板跳转文件
cat > ${BINDIR}/ui/index.html <<EOF
@@ -1410,7 +1413,7 @@ core_check(){
core_v=$(${TMPDIR}/core.new version 2>/dev/null | grep version | awk '{print $3}')
COMMAND='"$BINDIR/CrashCore run -D $BINDIR -c $TMPDIR/config.json"'
else
core_v=$(${TMPDIR}/core.new -v 2>/dev/null | grep linux | sed 's/ linux.*//;s/.* //')
core_v=$(${TMPDIR}/core.new -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
COMMAND='"$BINDIR/CrashCore -d $BINDIR -f $TMPDIR/config.yaml"'
fi
if [ -z "$core_v" ];then
@@ -1645,9 +1648,8 @@ start_old(){ #保守模式
ckcmd nohup && nohup=nohup #华硕调用nohup启动
$nohup $COMMAND &>/dev/null &
fi
afstart
cronset '保守模式守护进程' "*/1 * * * * test -z \"\$(pidof CrashCore)\" && ${CRASHDIR}/start.sh restart #ShellCrash保守模式守护进程"
cronset '保守模式守护进程' "* * * * * test -z \"\$(pidof CrashCore)\" && ${CRASHDIR}/start.sh start #ShellCrash保守模式守护进程"
}
#杂项
update_config(){ #更新订阅并重启