diff --git a/bin/ShellCrash.tar.gz b/bin/ShellCrash.tar.gz index fd2463c..4553be2 100644 Binary files a/bin/ShellCrash.tar.gz and b/bin/ShellCrash.tar.gz differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index be39b34..4dd54e0 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/public.tar.gz b/bin/public.tar.gz index 7b417c3..8460eb4 100644 Binary files a/bin/public.tar.gz and b/bin/public.tar.gz differ diff --git a/bin/version b/bin/version index 0f348e9..31be3c0 100644 --- a/bin/version +++ b/bin/version @@ -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 diff --git a/scripts/getdate.sh b/scripts/getdate.sh index c22ae46..552d52c 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -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" diff --git a/scripts/init.sh b/scripts/init.sh index 69f92cb..f8437b8 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -1,7 +1,7 @@ #!/bin/sh # Copyright (C) Juewuy -version=1.8.8e +version=1.8.8f setdir(){ dir_avail(){ diff --git a/scripts/menu.sh b/scripts/menu.sh index e5c2964..7edf484 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -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 diff --git a/scripts/start.sh b/scripts/start.sh index 003d6b4..6e35164 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -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 </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(){ #更新订阅并重启