summaryrefslogtreecommitdiffstats
path: root/rulemgt-standalone/src/main/assembly
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-09-01 15:55:21 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-09-01 15:55:21 +0800
commita1a48152eb10ff7b1691acc689f776e380911100 (patch)
tree9765192e745ec3b45f39216df8e0c7e49c0e894d /rulemgt-standalone/src/main/assembly
parentd11c4d39ad4f448dc82e754f65c0b68af3bbbe28 (diff)
Add DB information into the shell script
Add DB information before starting the service Change-Id: I3cc5b81d932f28d97afeee5eacfe3a3f398ad4bb Issue-ID: HOLMES-39 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'rulemgt-standalone/src/main/assembly')
-rw-r--r--rulemgt-standalone/src/main/assembly/bin/run.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/rulemgt-standalone/src/main/assembly/bin/run.sh b/rulemgt-standalone/src/main/assembly/bin/run.sh
index b6ab959..1a01912 100644
--- a/rulemgt-standalone/src/main/assembly/bin/run.sh
+++ b/rulemgt-standalone/src/main/assembly/bin/run.sh
@@ -31,5 +31,10 @@ echo @JAVA_OPTS@ $JAVA_OPTS
class_path="$main_path/:$main_path/holmes-rulemgt.jar"
echo @class_path@ $class_path
+sed -i "s|url:.*|url: jdbc:mysql://$URL_JDBC/holmes|" "$main_path/conf/rulemgt.yml"
+sed -i "s|msbServerAddr:.*|msbServerAddr: http://$MSB_ADDR|" "$main_path/conf/rulemgt.yml"
+
+./initDB.sh root rootpass 3306 `${URL_JDBC%:*}`
+
"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.holmes.rulemgt.RuleActiveApp server "$main_path/conf/rulemgt.yml"