Skip to content

Commit

Permalink
add start shell
Browse files Browse the repository at this point in the history
  • Loading branch information
ni-ze committed Jun 18, 2022
1 parent 1c2e568 commit ac35409
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 51 deletions.
49 changes: 0 additions & 49 deletions rsqldb-disk/bin/start-sql.sh

This file was deleted.

4 changes: 3 additions & 1 deletion rsqldb-disk/bin/start.sh → rsqldb-disk/bin/startRunner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ if [ ! -z "${JVM_CONFIG}" ]; then
JVM_OPTS+=("${JVM_CONFIG}")
fi

JVM_OPTS+=( "-Dlog4j.configuration=${BASE_DIR}/conf/log4j.xml" )

JVM_OPTS="${JVM_OPTS} -cp ${CLASSPATH}"

#JVM_OPTS+=( "-Dlog4j.configuration=$ROCKETMQ_STREAMS_CONFIGURATION/log4j.xml" )


# shellcheck disable=SC2068
# shellcheck disable=SC2039
Expand Down
30 changes: 30 additions & 0 deletions rsqldb-disk/bin/startServer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
set -e

[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=$HOME/jdk/java
[ ! -e "$JAVA_HOME/bin/java" ] && JAVA_HOME=/usr/java
[ ! -e "$JAVA_HOME/bin/java" ] && error_exit "Please set the JAVA_HOME variable in your environment, We need java(x64)!"

export JAVA_HOME
export JAVA="$JAVA_HOME/bin/java"
export BASE_DIR=$(dirname $0)/..
export CLASSPATH=.:${BASE_DIR}/conf:${BASE_DIR}/lib/*:${CLASSPATH}

JVM_CONFIG="-Xms2048m -Xmx2048m -Xmn1024m"

JAVA_OPTIONS=${JAVA_OPTIONS:-}

JVM_OPTS=()
if [ ! -z "${JAVA_OPTIONS}" ]; then
JVM_OPTS+=("${JAVA_OPTIONS}")
fi
if [ ! -z "${JVM_CONFIG}" ]; then
JVM_OPTS+=("${JVM_CONFIG}")
fi

JVM_OPTS="${JVM_OPTS} -cp ${CLASSPATH}"


$JAVA ${JVM_OPTS} -jar ${BASE_DIR}/lib/rsqldb-server-1.0.0-SNAPSHOT.jar


1 change: 1 addition & 0 deletions rsqldb-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.7.RELEASE</version>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

@SpringBootApplication(scanBasePackages = {"com.alibaba.rsqldb.clients"}, exclude = DataSourceAutoConfiguration.class)
@SpringBootApplication(scanBasePackages = {"com.alibaba.rsqldb.server"}, exclude = DataSourceAutoConfiguration.class)
public class Application {

public static void main(String[] args) {
Expand Down

0 comments on commit ac35409

Please sign in to comment.