summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2014-07-16 22:37:08 -0700
committerJohn Keiser <jkeiser@opscode.com>2014-07-23 19:21:24 -0600
commit08b2e660be71fb6a90a6638729f010429b8c3e98 (patch)
treef0eaa4b2eca7618668ecfd327c0d8c38941d0c8c /bin
parentf8658b80828262b5356f086f6c6ea69b706dde06 (diff)
downloadchef-zero-08b2e660be71fb6a90a6638729f010429b8c3e98.tar.gz
Add file store
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chef-zero9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/chef-zero b/bin/chef-zero
index 303634e..f72ea6c 100755
--- a/bin/chef-zero
+++ b/bin/chef-zero
@@ -8,6 +8,7 @@ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
require 'chef_zero/version'
require 'chef_zero/server'
+require 'chef_zero/data_store/raw_file_store'
require 'optparse'
def parse_port(port)
@@ -53,6 +54,10 @@ OptionParser.new do |opts|
options[:single_org] = nil
end
+ opts.on("--file-store PATH", "Persist data to files at the given path") do |value|
+ options[:data_store] = ChefZero::DataStore::RawFileStore.new(value)
+ end
+
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
@@ -64,6 +69,10 @@ OptionParser.new do |opts|
end
end.parse!
+if options[:data_store]
+ options[:data_store] = ChefZero::DataStore::DefaultFacade.new(options[:data_store], options[:single_org])
+end
+
server = ChefZero::Server.new(options)
if options[:daemon]