mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
v1.8.5e
~修复定时任务无法生效的bug ~修复本地/tmp导入内核时不记录版本号的bug ~修复升级后内核版本号丢失的bug ~调整singbox配置文件本地导入策略,现在只会导入config.json
This commit is contained in:
parent
0ac216bf77
commit
475b3b32e8
|
@ -1552,7 +1552,7 @@ update(){
|
|||
echo -----------------------------------------------
|
||||
echo -ne "\033[32m正在检查更新!\033[0m\r"
|
||||
checkupdate
|
||||
[ -z "$core_v" ] && core_v=unknow
|
||||
[ -z "$core_v" ] && core_v=$crashcore
|
||||
core_v_new=$(eval echo \$${crashcore}_v)
|
||||
echo -e "\033[30;47m欢迎使用更新功能:\033[0m"
|
||||
echo -----------------------------------------------
|
||||
|
|
|
@ -279,11 +279,12 @@ for file in log shellcrash.service mark? mark.bak;do
|
|||
done
|
||||
#旧版变量改名
|
||||
sed -i "s/clashcore/crashcore/g" $configpath
|
||||
sed -i "s/clash_v/core_v/g" $configpath
|
||||
sed -i "s/clash.meta/meta/g" $configpath
|
||||
sed -i "s/ShellClash/ShellCrash/g" $configpath
|
||||
#旧版任务清理
|
||||
${CRASHDIR}/start.sh cronset "clash服务" 2>/dev/null
|
||||
${CRASHDIR}/start.sh cronset "订阅链接" 2>/dev/null
|
||||
${CRASHDIR}/start.sh cronset "ShellCrash初始化" 2>/dev/null
|
||||
sleep 1
|
||||
|
||||
echo -e "\033[32m脚本初始化完成,请输入\033[30;47m crash \033[0;33m命令开始使用!\033[0m"
|
||||
|
|
|
@ -108,12 +108,14 @@ ckstatus(){
|
|||
read -p "是否加载(会停止当前服务)?(1/0) > " res
|
||||
[ "$res" = 1 ] && {
|
||||
${CRASHDIR}/start.sh stop
|
||||
$file -v &>/dev/null || $file version &>/dev/null
|
||||
if [ "$?" = 0 ];then
|
||||
core_v=$($file -v &>/dev/null)
|
||||
[ -z "$core_v" ] && $($file version &>/dev/null)
|
||||
if [ -n "$core_v" ];then
|
||||
source ${CRASHDIR}/getdate.sh && setcoretype && \
|
||||
mv -f $file ${CRASHDIR}/CrashCore && \
|
||||
echo -e "\033[32m内核加载完成!\033[0m " && \
|
||||
setconfig crashcore $crashcore && \
|
||||
setconfig core_v $core_v && \
|
||||
switch_core
|
||||
sleep 1
|
||||
else
|
||||
|
@ -127,7 +129,7 @@ ckstatus(){
|
|||
done
|
||||
#检查/tmp配置文件
|
||||
[ -x ${BINDIR}/CrashCore ] && \
|
||||
for file in `ls -F /tmp | grep -v [/\$] | grep -v '\ ' | grep -iE '.yaml$|.yml$|.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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) Juewuy
|
||||
|
||||
#加载全局变量
|
||||
CRASHDIR=$(cd $(dirname $0);pwd)
|
||||
CRASHDIR=$(cd "$(dirname "$(dirname "$0")")"; pwd)
|
||||
[ -z "$BINDIR" ] && BINDIR=${CRASHDIR}
|
||||
CFG_PATH=${CRASHDIR}/configs/ShellCrash.cfg
|
||||
TMPDIR=/tmp/ShellCrash && [ ! -f ${TMPDIR} ] && mkdir -p ${TMPDIR}
|
||||
|
|
Loading…
Reference in New Issue
Block a user