From 97f8e84b39a5f67a1c7e60454c2bf9c4174fb688 Mon Sep 17 00:00:00 2001 From: hanhh Date: Fri, 28 May 2021 17:14:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dentrypoint=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=96=B0=E5=A2=9E=E4=BB=BB=E5=8A=A1=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/docker-entrypoint.sh | 2 +- shell/api.sh | 4 ++-- shell/update.sh | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index bb6faa13..c7529514 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -28,7 +28,7 @@ echo -e "控制面板启动成功...\n" echo -e "======================5. 启动定时任务========================\n" cd $dir_root -if [[ $(pm2 info schedule) ]]; then +if [[ $(pm2 info schedule 2>/dev/null) ]]; then pm2 reload schedule else pm2 start $dir_root/build/schedule.js -n schedule diff --git a/shell/api.sh b/shell/api.sh index 12b3a0ef..2e3b7d81 100755 --- a/shell/api.sh +++ b/shell/api.sh @@ -124,9 +124,9 @@ del_cron_api() { code=$(echo $api | jq -r .code) message=$(echo $api | jq -r .message) if [[ $code == 200 ]]; then - echo -e "删除成功" + echo -e "成功" else - echo -e "删除失败(${message})" + echo -e "失败(${message})" fi } diff --git a/shell/update.sh b/shell/update.sh index f7f820a5..26114787 100755 --- a/shell/update.sh +++ b/shell/update.sh @@ -108,8 +108,7 @@ del_cron() { done if [[ $ids ]]; then result=$(del_cron_api "$ids") - detail="${result}\n\n${detail}" - notify "删除失效任务通知" "$detail" + notify "$path 删除任务${result}" "$detail" fi } @@ -145,7 +144,7 @@ add_cron() { fi fi done - notify "新增任务通知" "$detail" + notify "$path 新增任务" "$detail" } ## 更新仓库