Commit a8509766 authored by kalvin's avatar kalvin

fixbugs

parent 2963eb2c
......@@ -10,10 +10,22 @@ touch nohup.out
echo "Starting RabbitMQ..."
nohup /usr/sbin/rabbitmq-server > /tmp/rabbitmq.out &
echo "sleep 15"
sleep 15
count=1
echo "rabbitmq-plugins enable rabbitmq_delayed_message_exchange"
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
until [[ $count -eq 300 ]] || [[ $is_running -eq 1 ]]
do
let count+=1
echo "count is $count"
curl -X GET -H "Authorization: Basic cWE6cWF0ZXN0" "http://rabbitmq:15672/api/definitions"
tail -f /tmp/rabbitmq.out
\ No newline at end of file
if [ $? -eq 0 ]
then
echo "rabbitmq is running rabbitmq-plugins enable rabbitmq_delayed_message_exchange"
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
tail -f /tmp/rabbitmq.out
else
echo "rabbitmq is not running"
sleep 1
fi
done
\ No newline at end of file
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