diff --git a/scripts/menu.sh b/scripts/menu.sh index e62d502..ff6aea1 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -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 diff --git a/scripts/start.sh b/scripts/start.sh index 9325bfe..55552e0 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1457,7 +1457,7 @@ core_check(){ #检查及下载内核文件 tar_core ${BINDIR}/CrashCore.tar.gz CrashCore [ -z "$(find ${TMPDIR}/CrashCore $find_para 2>/dev/null)" ] && { logger "未找到【$crashcore】核心,正在下载!" 33 - [ -z "$cpucore" ] && source ${CRASHDIR}/getdate.sh && getcpucore + [ -z "$cpucore" ] && source ${CRASHDIR}/update.sh && getcpucore [ -z "$cpucore" ] && logger 找不到设备的CPU信息,请手动指定处理器架构类型! 31 && exit 1 get_bin ${TMPDIR}/CrashCore.tar.gz "bin/$crashcore/${target}-linux-${cpucore}.tar.gz" #校验内核 diff --git a/scripts/getdate.sh b/scripts/update.sh similarity index 99% rename from scripts/getdate.sh rename to scripts/update.sh index 6da4fd7..3b28288 100644 --- a/scripts/getdate.sh +++ b/scripts/update.sh @@ -1104,7 +1104,7 @@ set_core_config(){ #配置文件功能 esac } #下载更新相关 -gettar(){ +getscripts(){ #更新脚本文件 ${CRASHDIR}/start.sh get_bin ${TMPDIR}/update.tar.gz bin/clashfm.tar.gz if [ "$?" != "0" ];then echo -e "\033[33m文件下载失败!\033[0m" @@ -1127,7 +1127,7 @@ gettar(){ rm -rf ${TMPDIR}/update.tar.gz exit } -getsh(){ +setscripts(){ echo ----------------------------------------------- echo -e "当前脚本版本为:\033[33m $versionsh_l \033[0m" echo -e "最新脚本版本为:\033[32m $version_new \033[0m" @@ -1136,7 +1136,7 @@ getsh(){ read -p "是否更新脚本?[1/0] > " res if [ "$res" = '1' ]; then #下载更新 - gettar + getscripts #提示 echo ----------------------------------------------- echo -e "\033[32m管理脚本更新成功!\033[0m" @@ -1737,7 +1737,7 @@ setgeo(){ #数据库选择菜单 esac } -getdb(){ +getdb(){ #下载Dashboard文件 dblink="${update_url}/" echo ----------------------------------------------- echo 正在连接服务器获取安装文件………… @@ -1870,7 +1870,7 @@ setdb(){ esac } -getcrt(){ +getcrt(){ #下载根证书文件 echo ----------------------------------------------- echo 正在连接服务器获取安装文件………… ${CRASHDIR}/start.sh get_bin ${TMPDIR}/ca-certificates.crt bin/fix/ca-certificates.crt @@ -2096,7 +2096,7 @@ update(){ elif [ "$num" = 0 ]; then i= elif [ "$num" = 1 ]; then - getsh + setscripts elif [ "$num" = 2 ]; then setcore