Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (14 sloc) 438 Bytes
#!/usr/bin/env ruby
require File.dirname(__FILE__) + '/lib/env.rb'
ArgParser.extract_env_variables(ARGV)
action = ARGV.shift
Actions = {
"start" => lambda { Caprese.start },
"stop" => lambda { Caprese.stop },
"check" => lambda { Caprese.check_config && puts("Configuration is valid") }
}
if action && Actions[action]
Actions[action].call
else
puts "Usage: #{$0} [#{Actions.keys.sort.join '|'}] [ENV_VARIABLE=VALUE ...]"
end