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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 8e9bbfb  [Script] Check and create if the log directory not existed 
before outputing message to the log file. (#4929)
8e9bbfb is described below

commit 8e9bbfb3baf6480f7b4b676879912aacb1ddbae1
Author: id4alexsu <[email protected]>
AuthorDate: Sun Nov 22 20:52:32 2020 +0800

    [Script] Check and create if the log directory not existed before outputing 
message to the log file. (#4929)
    
    This is a minor issue when we had FE start after a fresh installation,
    but it will occur an error about the log directory is missing due to log 
directory is not existed
    before some environment check message outputing to the log file.
    the log directory creation code in bin/start_fe.sh is in the wrong place,
    only need to put the log directory creation code in the beginning.
---
 bin/start_fe.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bin/start_fe.sh b/bin/start_fe.sh
index ec22132..200d9bd 100755
--- a/bin/start_fe.sh
+++ b/bin/start_fe.sh
@@ -97,6 +97,11 @@ jdk_version() {
     fi
     echo "$result"
 }
+
+# need check and create if the log directory existed before outing message to 
the log file.
+if [ ! -d $LOG_DIR ]; then
+    mkdir -p $LOG_DIR
+fi
  
 # check java version and choose correct JAVA_OPTS
 java_version=$(jdk_version)
@@ -117,9 +122,6 @@ for f in $DORIS_HOME/lib/*.jar; do
 done
 export CLASSPATH=${CLASSPATH}:${DORIS_HOME}/lib
 
-if [ ! -d $LOG_DIR ]; then
-    mkdir -p $LOG_DIR
-fi
 
 pidfile=$PID_DIR/fe.pid
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to