getdate.sh > update.sh

This commit is contained in:
juewuy
2024-03-06 16:04:36 +08:00
parent 42475e82fb
commit 70464412ac
3 changed files with 15 additions and 15 deletions

View File

@@ -103,7 +103,7 @@ ckstatus(){
#检查新手引导
if [ -z "$userguide" ];then
setconfig userguide 1
source ${CRASHDIR}/getdate.sh && userguide
source ${CRASHDIR}/update.sh && userguide
fi
#检查执行权限
[ ! -x ${CRASHDIR}/start.sh ] && chmod +x ${CRASHDIR}/start.sh
@@ -118,7 +118,7 @@ ckstatus(){
core_v=$($file -v 2>/dev/null | head -n 1 | sed 's/ linux.*//;s/.* //')
[ -z "$core_v" ] && core_v=$($file version 2>/dev/null | grep -Eo 'version .*' | sed 's/version //')
if [ -n "$core_v" ];then
source ${CRASHDIR}/getdate.sh && setcoretype && \
source ${CRASHDIR}/update.sh && setcoretype && \
mv -f $file ${TMPDIR}/CrashCore && \
tar -zcf ${BINDIR}/CrashCore.tar.gz ${tar_para} -C ${TMPDIR} CrashCore && \
echo -e "\033[32m内核加载完成\033[0m " && \
@@ -184,7 +184,7 @@ start_core(){
echo -e "\033[33m没有找到${crashcore}配置文件尝试生成providers配置文件\033[0m"
[ "$crashcore" = singboxp ] && coretype=singbox
[ "$crashcore" = meta -o "$crashcore" = clashpre ] && coretype=clash
source ${CRASHDIR}/getdate.sh && gen_${coretype}_providers
source ${CRASHDIR}/update.sh && gen_${coretype}_providers
elif [ -s $core_config -o -n "$Url" -o -n "$Https" ];then
${CRASHDIR}/start.sh start
#设置循环检测以判定服务启动是否成功
@@ -201,7 +201,7 @@ start_core(){
[ -n "$test" -o -n "$(pidof CrashCore)" ] && startover
else
echo -e "\033[31m没有找到${crashcore}配置文件,请先导入配置文件!\033[0m"
source ${CRASHDIR}/getdate.sh && set_core_config
source ${CRASHDIR}/update.sh && set_core_config
fi
}
checkrestart(){
@@ -1777,10 +1777,10 @@ tools(){
i=
elif [ "$num" = 1 ]; then
source ${CRASHDIR}/getdate.sh && testcommand
source ${CRASHDIR}/update.sh && testcommand
elif [ "$num" = 2 ]; then
source ${CRASHDIR}/getdate.sh && userguide
source ${CRASHDIR}/update.sh && userguide
elif [ "$num" = 3 ]; then
log_pusher
@@ -1916,7 +1916,7 @@ main_menu(){
main_menu
elif [ "$num" = 6 ]; then
source ${CRASHDIR}/getdate.sh && set_core_config
source ${CRASHDIR}/update.sh && set_core_config
main_menu
elif [ "$num" = 7 ]; then
@@ -1934,7 +1934,7 @@ main_menu(){
elif [ "$num" = 9 ]; then
checkcfg=$(cat $CFG_PATH)
source ${CRASHDIR}/getdate.sh && update
source ${CRASHDIR}/update.sh && update
if [ -n "$PID" ];then
checkcfg_new=$(cat $CFG_PATH)
[ "$checkcfg" != "$checkcfg_new" ] && checkrestart