Commit 11a47d8a by Chavee Issariyapat

add brifge config

parent f8c75f16
......@@ -109,6 +109,46 @@ EOF
echo "max_message_size = ${VERNEMQ_MAX_MESSAGE_SIZE}" >> /etc/vernemq/vernemq.conf
fi
if env | grep -q "VERNEMQ_BRIDGE"; then
echo "plugins.vmq_bridge = ${VERNEMQ_BRIDGE}" >> /etc/vernemq/vernemq.conf
echo "vmq_bridge.tcp.br0 = ${VERNEMQ_BRIDGE_URI}" >> /etc/vernemq/vernemq.conf
if env | grep -q "VERNEMQ_BRIDGE_CLEANSESSION"; then
echo "vmq_bridge.tcp.br0.cleansession = ${VERNEMQ_BRIDGE_CLEANSESSION}" >> /etc/vernemq/vernemq.conf
fi
echo "vmq_bridge.tcp.br0.client_id = auto" >> /etc/vernemq/vernemq.conf
echo "vmq_bridge.tcp.br0.username = ${VERNEMQ_BRIDGE_USERNAME}" >> /etc/vernemq/vernemq.conf
echo "vmq_bridge.tcp.br0.password = ${VERNEMQ_BRIDGE_PASSWORD}" >> /etc/vernemq/vernemq.conf
if env | grep -q "VERNEMQ_BRIDGE_TOPIC1"; then
echo "vmq_bridge.tcp.br0.topic.1 = ${VERNEMQ_BRIDGE_TOPIC1}" >> /etc/vernemq/vernemq.conf
fi
if env | grep -q "VERNEMQ_BRIDGE_TOPIC2"; then
echo "vmq_bridge.tcp.br0.topic.2 = ${VERNEMQ_BRIDGE_TOPIC2}" >> /etc/vernemq/vernemq.conf
fi
if env | grep -q "VERNEMQ_BRIDGE_TOPIC3"; then
echo "vmq_bridge.tcp.br0.topic.3 = ${VERNEMQ_BRIDGE_TOPIC3}" >> /etc/vernemq/vernemq.conf
fi
if env | grep -q "VERNEMQ_BRIDGE_TOPIC4"; then
echo "vmq_bridge.tcp.br0.topic.4 = ${VERNEMQ_BRIDGE_TOPIC4}" >> /etc/vernemq/vernemq.conf
fi
fi
if env | grep -q "VERNEMQ_BRIDGE"; then
echo "plugins.vmq_bridge = ${VERNEMQ_BRIDGE}" >> /etc/vernemq/vernemq.conf
fi
echo "########## End ##########" >> /etc/vernemq/vernemq.conf
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment