Commit a8509766 authored by kalvin's avatar kalvin

fixbugs

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