Commit e5f9cf54 by Chavee Issariyapat

also write node name to vernemq.conf

parent 48398c11
...@@ -12,8 +12,10 @@ chmod 755 /var/lib/vernemq /var/log/vernemq ...@@ -12,8 +12,10 @@ chmod 755 /var/lib/vernemq /var/log/vernemq
# Ensure the Erlang node name is set correctly # Ensure the Erlang node name is set correctly
if env | grep -q "DOCKER_VERNEMQ_NODENAME"; then if env | grep -q "DOCKER_VERNEMQ_NODENAME"; then
sed -i.bak -r "s/VerneMQ@.+/VerneMQ@${DOCKER_VERNEMQ_NODENAME}/" /etc/vernemq/vm.args sed -i.bak -r "s/VerneMQ@.+/VerneMQ@${DOCKER_VERNEMQ_NODENAME}/" /etc/vernemq/vm.args
echo "nodename = VerneMQ@${DOCKER_VERNEMQ_NODENAME}" >> /etc/vernemq/vernemq.conf
else else
sed -i.bak -r "s/VerneMQ@.+/VerneMQ@${IP_ADDRESS}/" /etc/vernemq/vm.args sed -i.bak -r "s/VerneMQ@.+/VerneMQ@${IP_ADDRESS}/" /etc/vernemq/vm.args
echo "nodename = VerneMQ@${IP_ADDRESS}" >> /etc/vernemq/vernemq.conf
fi fi
if env | grep -q "DOCKER_VERNEMQ_DISCOVERY_NODE"; then if env | grep -q "DOCKER_VERNEMQ_DISCOVERY_NODE"; then
...@@ -98,7 +100,6 @@ EOF ...@@ -98,7 +100,6 @@ EOF
#echo "vmq_webhooks.webhook8.endpoint = ${VERNEMQ_WEBHOOK_HOST}/onpub" >> /etc/vernemq/vernemq.conf #echo "vmq_webhooks.webhook8.endpoint = ${VERNEMQ_WEBHOOK_HOST}/onpub" >> /etc/vernemq/vernemq.conf
fi fi
echo "########## End ##########" >> /etc/vernemq/vernemq.conf echo "########## End ##########" >> /etc/vernemq/vernemq.conf
fi 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