diff --git a/seatunnel-server/seatunnel-app/src/main/bin/seatunnel-backend-daemon.sh b/seatunnel-server/seatunnel-app/src/main/bin/seatunnel-backend-daemon.sh old mode 100644 new mode 100755 index eef62beb7..12f155b68 --- a/seatunnel-server/seatunnel-app/src/main/bin/seatunnel-backend-daemon.sh +++ b/seatunnel-server/seatunnel-app/src/main/bin/seatunnel-backend-daemon.sh @@ -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" @@ -78,4 +91,4 @@ case "$1" in *) echo "Usage: seatunnel-daemon.sh {start|stop|status}" exit 1 -esac \ No newline at end of file +esac