From 2049cf9aa986c1ea00e94c99da1524e1d65d6bf2 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Tue, 29 Jun 2021 10:51:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ql=20check=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/check.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/shell/check.sh b/shell/check.sh index 0847c902..e830fd31 100644 --- a/shell/check.sh +++ b/shell/check.sh @@ -5,8 +5,6 @@ dir_shell=/ql/shell . $dir_shell/api.sh get_token -panelLogPath="/root/.pm2/logs/panel-error.log" - reset_env() { echo -e "---> 1. 开始检测配置文件\n" fix_config @@ -50,8 +48,8 @@ pm2_log() { echo -e "---> pm2日志" local panelOut="/root/.pm2/logs/panel-out.log" local panelError="/root/.pm2/logs/panel-error.log" - tail -n 10 "$panelOut" - tail -n 10 "$panelError" + tail -n 20 "$panelOut" + tail -n 20 "$panelError" } check_nginx() { @@ -98,8 +96,20 @@ check_pm2() { fi } +init_git() { + local dir_current=$(pwd) + + cd $dir_root + git config --global user.email "qinglong@@users.noreply.github.com" + git config --global user.name "qinglong" + git config --global pull.rebase true + + cd $dir_current +} + main() { echo -e "=====> 开始检测" + init_git check_ql check_pm2 echo -e "\n=====> 检测结束\n"