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" } ## 更新仓库