From eff90e8d00443ca58997e9b947bb714f70d05350 Mon Sep 17 00:00:00 2001 From: id4alexsu Date: Thu, 19 Nov 2020 17:37:18 +0800 Subject: [PATCH] check and create if the log directory not existed before outputing message to the log file. --- 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 ec22132d733df5..200d9bda6a4f6d 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