From 23fce7d9285362da49c2bb196f5c441b70ff5021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?v=5Fwbmqwang=28=E7=8E=8B=E7=9B=9F=E5=8D=BF=29?= Date: Wed, 28 Feb 2024 09:44:51 +0800 Subject: [PATCH] fix bin file starting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: v_wbmqwang(王盟卿) --- bin/service.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/service.sh b/bin/service.sh index 78f018cd..2ac286de 100644 --- a/bin/service.sh +++ b/bin/service.sh @@ -81,9 +81,11 @@ eval action=\$$# main_class=org.fedai.fate.board.bootstrap.Bootstrap module=fateboard version=2.0.0 +start_type=background if [ $action = starting ];then action=start + start_type=front elif [ $action = restarting ];then action=restart fi @@ -252,7 +254,7 @@ start() { cmd="$JAVA_HOME/bin/java -Dspring.config.location=$configpath/application.properties -Dssh_config_file=$basepath/ssh/ -Xmx2048m -Xms2048m -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -cp $libpath/*:$basepath/${module}-${version}.jar ${main_class}" print_info "The command is: $cmd" - if [[ $1 == "front" ]]; then + if [[ ${start_type} == "front" ]]; then exec $cmd >> ${BOARD_HOME}/logs/bootstrap.${module}.out 2>>${BOARD_HOME}/logs/bootstrap.${module}.err else exec $cmd >> ${BOARD_HOME}/logs/bootstrap.${module}.out 2>>${BOARD_HOME}/logs/bootstrap.${module}.err &