diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index d201a6d5..92fb7f7a 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -42,13 +42,13 @@ echo -e "定时任务启动成功...\n" if [[ $AutoStartBot == true ]]; then echo -e "======================7. 启动bot========================\n" - nohup ql bot >>$dir_log/bot.log 2>&1 & + nohup ql bot >$dir_log/bot.log 2>&1 & echo -e "bot后台启动中...\n" fi if [[ $EnableExtraShell == true ]]; then echo -e "======================8. 执行自定义脚本========================\n" - nohup ql extra >>$dir_log/extra.log 2>&1 & + nohup ql extra >$dir_log/extra.log 2>&1 & echo -e "自定义脚本后台执行中...\n" fi diff --git a/shell/share.sh b/shell/share.sh index 4bee2b35..7e4b367f 100755 --- a/shell/share.sh +++ b/shell/share.sh @@ -349,8 +349,8 @@ reset_branch() { local branch="$1" if [[ $branch ]]; then part_cmd="origin/${branch}" - git checkout -B "$branch" - git branch --set-upstream-to=$part_cmd $branch + git checkout -B "$branch" &>/dev/null + git branch --set-upstream-to=$part_cmd $branch &>/dev/null fi git reset --hard $part_cmd &>/dev/null } diff --git a/shell/update.sh b/shell/update.sh index d949a984..7bab6752 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -248,7 +248,6 @@ update_qinglong() { export isFirstStartServer=false - local no_restart="$1" local all_branch=$(git branch -a) local primary_branch="master" if [[ "${all_branch}" =~ "${current_branch}" ]]; then @@ -266,10 +265,16 @@ update_qinglong() { [[ -f $dir_root/package.json ]] && ql_depend_new=$(cat $dir_root/package.json) [[ "$ql_depend_old" != "$ql_depend_new" ]] && npm_install_2 $dir_root - else - echo -e "\n更新青龙源文件失败,请检查原因...\n" - fi + update_qinglong_static "$1" "$primary_branch" + else + echo -e "\n更新青龙源文件失败,请检查网络...\n" + fi +} + +update_qinglong_static() { + local no_restart="$1" + local primary_branch="$2" local url="https://github.com/whyour/qinglong-static.git" if [[ -d ${ql_static_repo}/.git ]]; then reset_romote_url ${ql_static_repo} ${url} ${primary_branch} @@ -291,9 +296,8 @@ update_qinglong() { reload_pm2 fi else - echo -e "\n更新青龙静态资源失败,请检查原因...\n" + echo -e "\n更新青龙静态资源失败,请检查网络...\n" fi - } ## 对比脚本 diff --git a/src/pages/setting/checkUpdate.tsx b/src/pages/setting/checkUpdate.tsx index 0a0895dd..b166ac79 100644 --- a/src/pages/setting/checkUpdate.tsx +++ b/src/pages/setting/checkUpdate.tsx @@ -137,7 +137,12 @@ const CheckUpdate = ({ socketMessage }: any) => { } const newMessage = `${value}${_message}`; + const updateFailed = newMessage.includes('失败,请检查'); + modalRef.current.update({ + maskClosable: updateFailed, + closable: updateFailed, + okButtonProps: { disabled: !updateFailed }, content: (
{
});
setValue(newMessage);
+ if (updateFailed) {
+ message.error('更新失败,请检查网络及日志或稍后再试');
+ }
+
document.getElementById('log-identifier') &&
document
.getElementById('log-identifier')!