diff --git a/bin/vernemq.sh b/bin/vernemq.sh index ecc40fc..25344ec 100755 --- a/bin/vernemq.sh +++ b/bin/vernemq.sh @@ -400,8 +400,12 @@ if [ $start_join_cluster -eq 1 ]; then mkdir -p /var/log/vernemq/log join_cluster > /var/log/vernemq/log/join_cluster.log & fi + if [ -n "$API_KEY" ]; then - sleep 10 && echo "Adding API_KEY..." && /vernemq/bin/vmq-admin api-key add key="${API_KEY:-DEFAULT}" + sleep 60 + echo "Adding API_KEY..." + vmq-admin api-key add key="${API_KEY}" vmq-admin api-key show fi + wait $pid