From 2c44e3833d2664a1de54c1d282602f4eece5ca4f Mon Sep 17 00:00:00 2001
From: Alexey Golubev <Alexey.Golubev@onlyoffice.com>
Date: Wed, 6 Mar 2019 12:30:54 +0300
Subject: [PATCH] Change setup amqp server type

---
 run-document-server.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/run-document-server.sh b/run-document-server.sh
index 82f1b85..da091d9 100755
--- a/run-document-server.sh
+++ b/run-document-server.sh
@@ -145,11 +145,12 @@ update_postgresql_settings(){
 
 update_rabbitmq_setting(){
   if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then
+    ${JSON} -I -e "this.queue.type = 'rabbitmq'"
     ${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
   
   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.connectOptions===undefined)this.activemq.connectOptions={};"
 
@@ -172,8 +173,6 @@ update_rabbitmq_setting(){
     else
       ${JSON} -I -e "delete this.activemq.connectOptions.password"
     fi
-
-    sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1false\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js
   fi
 }
 
-- 
GitLab