bin/flapjack in flapjack-0.8.10 vs bin/flapjack in flapjack-0.8.11
- old
+ new
@@ -51,14 +51,22 @@
opts.on("-c", "--config [PATH]", String, "PATH to the config file to use") do |c|
options.config = c
end
+ opts.on("-n", "--environment [ENV]", String, "Environment to boot") do |e|
+ options.environment = e
+ end
+
opts.on("-d", "--[no-]daemonize", "Daemonize?") do |d|
options.daemonize = d
end
+ opts.on('-r', '--rbtrace', 'Enable rbtrace profiling') do
+ require 'rbtrace'
+ end
+
opts.on("-p", "--pidfile [PATH]", String, "PATH to the pidfile to write to") do |pid|
options.pidfile = pid
end
opts.on("-l", "--logfile [PATH]", String, "PATH to the logfile to write to") do |l|
@@ -86,11 +94,11 @@
end
puts "\n#{optparse}"
exit 1
end
-FLAPJACK_ENV = ENV['FLAPJACK_ENV'] || 'production'
+FLAPJACK_ENV = options.environment || ENV['FLAPJACK_ENV'] || 'production'
config = Flapjack::Configuration.new
config.load(options.config)
config_env = config.all
@@ -156,9 +164,10 @@
runner = get_runner
if runner.daemon_running?
puts "Flapjack is already running."
else
print "Flapjack starting..."
+ print "\n" unless daemonize
return_value = nil
runner.execute(:daemonize => daemonize) {
return_value = flapjack_coord.call
}
puts " done."