修复 task 命令任务ID查询,系统依赖安装逻辑

This commit is contained in:
whyour
2023-04-30 19:35:14 +08:00
parent b29a9e012c
commit 5354fc76db
3 changed files with 10 additions and 8 deletions
+5 -2
View File
@@ -39,9 +39,12 @@ handle_log_path() {
fi
if [[ -z $ID ]]; then
ID=$(cat $list_crontab_user | grep -E "$cmd_task $file_param" | perl -pe "s|.*ID=(.*) $cmd_task $file_param\.*|\1|" | head -1 | awk -F " " '{print $1}')
ID=$(cat $list_crontab_user | grep -E "$cmd_task.* $filename" | perl -pe "s|.*ID=(.*) $cmd_task.* $filename\.*|\1|" | head -1 | awk -F " " '{print $1}')
fi
local suffix=""
if [[ ! -z $ID ]]; then
suffix="_${ID}"
fi
local suffix="_${ID}"
time=$(date "+$mtime_format")
log_time=$(format_log_time "$mtime_format" "$time")