diff --git a/scripts-new/bricks.sh b/scripts-new/bricks.sh index 71c6966b1..d2077ec1e 100644 --- a/scripts-new/bricks.sh +++ b/scripts-new/bricks.sh @@ -15,7 +15,7 @@ stop_binaries() { } LOG_FILE=log.file -TMP_LOG_FILE=tmp.log.file +ERR_LOG_FILE=err.log.file #启动所有的二进制 start_binaries() { @@ -31,10 +31,7 @@ start_binaries() { #nohup sh -c '"$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG" 2>&1 | tee test.log' & #nohup ./run_my_command.sh "$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG" > test.log 2>&1 & cmd=("$bin_full_path" -i "$i" -c "$OPENIM_OUTPUT_CONFIG") - #nohup "${cmd[@]}" >> "${LOG_FILE}" 2> >(tee -a "$TMP_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) & - nohup "${cmd[@]}" > >(tee -a "$TMP_LOG_FILE") 2> >(tee -a "$TMP_LOG_FILE" >&2) & - - + nohup "${cmd[@]}" >> "${LOG_FILE}" 2> >(tee -a "$ERR_LOG_FILE" | while read line; do echo -e "\e[31m${line}\e[0m"; done >&2) & done done }