diff options
author | danielsdeleo <dan@getchef.com> | 2015-03-31 14:33:19 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2015-04-01 13:35:01 -0700 |
commit | 8157fdea21c913dfb99ee4f8c285d2d64557d4bc (patch) | |
tree | 3d4d3998276f92411cc61cac8135befd3de714e2 /lib/chef/local_mode.rb | |
parent | f066fef19be99ba1b857ecaaabc4c70c9201f1d4 (diff) | |
download | chef-8157fdea21c913dfb99ee4f8c285d2d64557d4bc.tar.gz |
Add --no-listen option to disable zero binding to port
Diffstat (limited to 'lib/chef/local_mode.rb')
-rw-r--r-- | lib/chef/local_mode.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/local_mode.rb b/lib/chef/local_mode.rb index c6c5685e3f..79fb750dd8 100644 --- a/lib/chef/local_mode.rb +++ b/lib/chef/local_mode.rb @@ -65,7 +65,11 @@ class Chef server_options[:port] = parse_port(Chef::Config.chef_zero.port) @chef_zero_server = ChefZero::Server.new(server_options) - @chef_zero_server.start_background + if Chef::Config[:listen] + @chef_zero_server.start_background + else + @chef_zero_server.start_socketless + end local_mode_url = @chef_zero_server.local_mode_url |