Skip to content

Commit

Permalink
[Improve] When starting, check whether the environment variable "SEAT…
Browse files Browse the repository at this point in the history
…UNNEL_HOME" exists or not. (#134)
  • Loading branch information
FlechazoW authored Oct 19, 2023
1 parent fbb80bf commit 26f08b6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion seatunnel-server/seatunnel-app/src/main/bin/seatunnel-backend-daemon.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,23 @@ set -

WORKDIR=$(cd "$(dirname "$0")" || exit; pwd)

# check
check() {
# check whether the SEATUNNEL_HOME exists or not.
if [ "${SEATUNNEL_HOME}" ];then
echo "Load connectors from ${SEATUNNEL_HOME}"
else
echo "SEATUNNEL_HOME is not be set. Please check it."
exit 1
fi
}

# start
start() {
echo "starting seatunnel..."

check

JAVA_OPTS="${JAVA_OPTS} -server -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"
SPRING_OPTS="${SPRING_OPTS} -Dspring.config.name=application.yml -Dspring.config.location=classpath:application.yml"
JAVA_OPTS="${JAVA_OPTS} -Dseatunnel-web.logs.path=${WORKDIR}/../logs"
Expand Down Expand Up @@ -78,4 +91,4 @@ case "$1" in
*)
echo "Usage: seatunnel-daemon.sh {start|stop|status}"
exit 1
esac
esac

0 comments on commit 26f08b6

Please sign in to comment.