Change setup amqp server type

This commit is contained in:
Alexey Golubev 2019-03-06 12:30:54 +03:00 committed by Alexey Golubev
parent f999dd4214
commit 2c44e3833d

@ -145,11 +145,12 @@ update_postgresql_settings(){
update_rabbitmq_setting(){ update_rabbitmq_setting(){
if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then
${JSON} -I -e "this.queue.type = 'rabbitmq'"
${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'" ${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'"
sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1true\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js
fi fi
if [ "${AMQP_SERVER_TYPE}" == "activemq" ]; then if [ "${AMQP_SERVER_TYPE}" == "activemq" ]; then
${JSON} -I -e "this.queue.type = 'activemq'"
${JSON} -I -e "if(this.activemq===undefined)this.activemq={};" ${JSON} -I -e "if(this.activemq===undefined)this.activemq={};"
${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};" ${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};"
@ -172,8 +173,6 @@ update_rabbitmq_setting(){
else else
${JSON} -I -e "delete this.activemq.connectOptions.password" ${JSON} -I -e "delete this.activemq.connectOptions.password"
fi fi
sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1false\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js
fi fi
} }