Fix the Grammatical Error in the Script
[holmes/engine-management.git] / engine-d-standalone / src / main / assembly / bin / run.sh
index 6935858..eeed056 100644 (file)
@@ -31,15 +31,21 @@ echo @JAVA_OPTS@ $JAVA_OPTS
 class_path="$main_path/:$main_path/holmes-engine-d.jar"
 echo @class_path@ $class_path
 
+sed -i "s/activemq.username=.*/activemq.username=activemq/" /home/activemq/apache-activemq-5.9.0/conf/credentials.properties
+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:mysql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml"
+sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC/holmes|" "$main_path/conf/engine-d.yml"
 
 
 export SERVICE_IP=`hostname -i`
 echo SERVICE_IP=${SERVICE_IP}
 
-#ActiveMQ IP Configurtion
+if [ ${TESTING} == 1 ]; then
+    export HOSTNAME=${SERVICE_IP}:9102
+fi
+
+#ActiveMQ IP Configurations
 sed -i "s|brokerIp:.*|brokerIp: $SERVICE_IP|" "$main_path/conf/engine-d.yml"
 
 cat "$main_path/conf/engine-d.yml"