summaryrefslogtreecommitdiffstats
path: root/engine-d-standalone/src
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-02 11:55:51 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-11-02 11:58:03 +0800
commit493c2f4e8f5d5c6f642f300d4e116873cd9051c8 (patch)
tree1ee791b0725d4849784e9cd0e82261ce01615e40 /engine-d-standalone/src
parent26e48275b69ee7539f6e8a9686e7add9d499d5e5 (diff)
Add Some Vars to Adjust Holmes to DCAE Bootstrap
Change-Id: I79ccd29a4adc818a98692090aab8f935ea3d7720 Issue-ID: HOLMES-83 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
Diffstat (limited to 'engine-d-standalone/src')
-rw-r--r--engine-d-standalone/src/main/assembly/bin/run.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/engine-d-standalone/src/main/assembly/bin/run.sh b/engine-d-standalone/src/main/assembly/bin/run.sh
index 59a1c18..dab4cbc 100644
--- a/engine-d-standalone/src/main/assembly/bin/run.sh
+++ b/engine-d-standalone/src/main/assembly/bin/run.sh
@@ -37,8 +37,24 @@ sed -i "s/activemq.username=.*/activemq.username=activemq/" /home/activemq/apach
sed -i "s/activemq.password=.*/activemq.password=v1/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties
/home/activemq/apache-activemq-5.9.0/bin/activemq start
-sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml"
+if [ -z ${JDBC_USERNAME} ]; then
+ export JDBC_USERNAME=holmes
+ echo "No user name is specified for the database. Use the default value \"$JDBC_USERNAME\"."
+fi
+
+if [ -z ${JDBC_PASSWORD} ]; then
+ export JDBC_PASSWORD=holmespwd
+ echo "No password is specified for the database. Use the default value \"$JDBC_PASSWORD\"."
+fi
+
+if [ -z ${DB_NAME} ]; then
+ export DB_NAME=holmes
+ echo "No database is name is specified. Use the default value \"$DB_NAME\"."
+fi
+sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/$DB_NAME|" "$main_path/conf/engine-d.yml"
+sed -i "s|user:.*|user: $JDBC_USERNAME|" "$main_path/conf/engine-d.yml"
+sed -i "s|password:.*|password: $JDBC_PASSWORD|" "$main_path/conf/engine-d.yml"
export SERVICE_IP=`hostname -i`
echo SERVICE_IP=${SERVICE_IP}