Skip to content

Commit

Permalink
add init-broker.sh (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
caseone authored Mar 24, 2021
1 parent 9202e2f commit 71603c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ gradle.properties
logs/
build/
out/
weevent-core/dist/
weevent-client/dist/
weevent-broker/dist/
weevent-governance/dist/
weevent-processor/dist/


### npm build
node_modules/
Expand Down
16 changes: 16 additions & 0 deletions weevent-broker/dist/init-broker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

JAVA_HOME=/opt/jdk1.8.0_91

if [[ -z ${JAVA_HOME} ]];then
echo "JAVA_HOME is null, please set it first"
exit 1
fi

${JAVA_HOME}/bin/java -Xbootclasspath/a:./conf -cp ./apps/* -Dloader.path=./lib,../lib -Dloader.main=com.webank.weevent.broker.db.InitialDb org.springframework.boot.loader.PropertiesLauncher
if [[ $? -ne 0 ]];then
echo "init broker db failed, please check the configuration of mysql"
exit 1
else
echo "init broker db success"
fi

0 comments on commit 71603c6

Please sign in to comment.