增加运行指定命令接口

This commit is contained in:
whyour
2023-05-01 14:28:58 +08:00
parent df1addc1ff
commit aab6bbeb15
7 changed files with 124 additions and 25 deletions
+9 -1
View File
@@ -43,7 +43,11 @@ handle_log_path() {
fi
local suffix=""
if [[ ! -z $ID ]]; then
suffix="_${ID}"
if [[ "$ID" -gt 0 ]] 2>/dev/null; then
suffix="_${ID}"
else
ID=""
fi
fi
time=$(date "+$mtime_format")
@@ -66,6 +70,10 @@ handle_log_path() {
if [[ "$show_log" == "true" ]]; then
cmd="2>&1 | tee -a $dir_log/$log_path"
fi
if [[ "$real_time" == "true" ]]; then
cmd=""
fi
}
format_params() {