Sha256: d6bc617a7c373ae03918d0143981cbb19ad2300cd8a32127fa033616a683c595

Contents?: true

Size: 635 Bytes

Versions: 1

Compression:

Stored size: 635 Bytes

Contents

module MyScripts
  # Starts and controls rabbitmq server
  class Rabbit < Script
    def run
      case @argv.shift 
        when /start/
          system "%ERLANG_HOME%/lib/rabbitmq_server-1.7.0/sbin/rabbitmq-server.bat #{ARGV.join(' ')}"
        when /stop/
          system "%ERLANG_HOME%/lib/rabbitmq_server-1.7.0/sbin/rabbitmqctl.bat stop #{ARGV.join(' ')}"
        when /ctl/
          system "%ERLANG_HOME%/lib/rabbitmq_server-1.7.0/sbin/rabbitmqctl.bat #{ARGV.join(' ')}"
        else
          usage ["start [args] - starts rabbitmq node", "mqctl [args] - controls rabbitmq node"]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
my_scripts-0.0.13 lib/my_scripts/rabbit.rb