summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPhil Dibowitz <phild@fb.com>2016-03-18 14:00:48 -0700
committerPhil Dibowitz <phil@ipom.com>2016-03-22 21:52:58 -0700
commitce63bd7c18786dfc180752236ac090a1a5febc83 (patch)
tree5e65892f458cd3c743fc165f7c69fa91ff4fb1cc /bin
parentc67095f4da311feb3d63cfd35cb25ee07e49f4b2 (diff)
downloadchef-zero-ce63bd7c18786dfc180752236ac090a1a5febc83.tar.gz
Enable listening on more than one address
If you listen on :: you get all v6 addrs. If you listen on 0.0.0.0 you get all v4 addrs. There's no way to listen on both. Allow people to pass in multiple `--host`s
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chef-zero3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/chef-zero b/bin/chef-zero
index 231d71b..03b6d01 100755
--- a/bin/chef-zero
+++ b/bin/chef-zero
@@ -31,7 +31,8 @@ OptionParser.new do |opts|
opts.banner = "Usage: chef-zero [ARGS]"
opts.on("-H", "--host HOST", "Host to bind to (default: 127.0.0.1)") do |value|
- options[:host] = value
+ options[:host] ||= []
+ options[:host] << value
end
opts.on("-p", "--port PORT", "Port to listen on (e.g. 8889, or 8500-8600 or 8885,8888)") do |value|