Skip to content

Instantly share code, notes, and snippets.

@JasonGiedymin
Created November 19, 2011 21:34
Show Gist options
  • Save JasonGiedymin/1379386 to your computer and use it in GitHub Desktop.
Save JasonGiedymin/1379386 to your computer and use it in GitHub Desktop.
Easy RabbitMQ Start/Stop Rake tasks for OSX
#
# Don't want to run PostgreSQL as a service? Want to manually start and stop it?
# >> bundle exec rake rabbitmq:mac:start
# >> bundle exec rake rabbitmq:mac:stop
#
namespace :rabbitmq do
namespace :mac do
desc "Starts a Mac brew installed RabbitMQ server."
task :start do
puts "Starting detached server..."
result = %x[rabbitmq-server -detached]
puts result
end
desc "Stops a Mac brew installed RabbitMQ server."
task :stop do
puts "Stoping detached server..."
result = %x[rabbitmqctl stop]
puts result
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment