~修复定时任务无法生效以及启动后报错的bug
~修复本地/tmp导入内核时不记录版本号的bug
~修复升级后内核版本号丢失的bug
~调整singbox配置文件本地导入策略,现在只会导入config.json
This commit is contained in:
juewuy 2024-01-11 16:28:46 +08:00
parent 475b3b32e8
commit ff4fcf736b

View File

@ -2,7 +2,7 @@
# Copyright (C) Juewuy # Copyright (C) Juewuy
#加载全局变量 #加载全局变量
CRASHDIR=$(cd "$(dirname "$(dirname "$0")")"; pwd) [ -z "$CRASHDIR" ] && CRASHDIR=$(cd "$(dirname "$(dirname "$0")")"; pwd)
[ -z "$BINDIR" ] && BINDIR=${CRASHDIR} [ -z "$BINDIR" ] && BINDIR=${CRASHDIR}
CFG_PATH=${CRASHDIR}/configs/ShellCrash.cfg CFG_PATH=${CRASHDIR}/configs/ShellCrash.cfg
TMPDIR=/tmp/ShellCrash && [ ! -f ${TMPDIR} ] && mkdir -p ${TMPDIR} TMPDIR=/tmp/ShellCrash && [ ! -f ${TMPDIR} ] && mkdir -p ${TMPDIR}
@ -13,6 +13,9 @@ setconfig(){
[ -z "$3" ] && configpath=$CFG_PATH || configpath=$3 [ -z "$3" ] && configpath=$CFG_PATH || configpath=$3
[ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath [ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath
} }
ckcmd(){ #检查命令是否存在
command -v sh &>/dev/null && command -v $1 &>/dev/null || type $1 &>/dev/null
}
#任务命令 #任务命令
check_update(){ #检查更新工具 check_update(){ #检查更新工具