This is an automated email from the ASF dual-hosted git repository.

liugddx pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 503a15f6a6 [Improve][Bin] If the log path does not exist, the script 
automatically creates it. (#5322)
503a15f6a6 is described below

commit 503a15f6a6056b41672d88cfc0e2f128377a4b73
Author: FlechazoW <[email protected]>
AuthorDate: Thu Aug 17 11:14:52 2023 +0800

    [Improve][Bin] If the log path does not exist, the script automatically 
creates it. (#5322)
---
 .../seatunnel-starter/src/main/bin/seatunnel-cluster.sh       | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh 
b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
index 919b545bbf..d4644f2d4d 100755
--- a/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
+++ b/seatunnel-core/seatunnel-starter/src/main/bin/seatunnel-cluster.sh
@@ -105,9 +105,12 @@ do
 done < ${APP_DIR}/config/jvm_options
 
 if [[ $DAEMON == true && $HELP == false ]]; then
- touch $OUT
- nohup java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args} > "$OUT" 200<&- 
2>&1 < /dev/null &
- else
- java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}
+  if [[ ! -d ${APP_DIR}/logs ]]; then
+    mkdir -p ${APP_DIR}/logs
+  fi
+  touch $OUT
+  nohup java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args} > "$OUT" 
200<&- 2>&1 < /dev/null &
+  else
+  java ${JAVA_OPTS} -cp ${CLASS_PATH} ${APP_MAIN} ${args}
 fi
 

Reply via email to