summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteven Danna <steve@opscode.com>2013-06-08 13:31:01 -0700
committerSteven Danna <steve@opscode.com>2013-06-08 13:37:44 -0700
commit1a7e1dfa58cb0309b74dba409b2c199ea061127e (patch)
treebb53ef7b4ca748c4cba1503caf33e563d7a84ce8 /bin
parent196a4798d09b2b93866ebfe73b96bf2daba94f5f (diff)
downloadchef-zero-1a7e1dfa58cb0309b74dba409b2c199ea061127e.tar.gz
Allow chef-zero to listen on Unix domain socket.
Puma has support for unix domain sockets. This commit adds a -s option to chef-zero that allows the user to specify a path rather than an IP and port: > chef-zero -s /tmp/chef-zero.sock Clients can then connect to this socket: > telnet -u /tmp/chef-server.sock Trying /tmp/chef-server.sock... Connected to (null). Escape character is '^]'. GET /nodes HTTP/1.1 HTTP/1.1 200 OK Content-Type: application/json Content-Length: 3 { }
Diffstat (limited to 'bin')
-rwxr-xr-xbin/chef-zero4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/chef-zero b/bin/chef-zero
index b6b8a97..2d2f492 100755
--- a/bin/chef-zero
+++ b/bin/chef-zero
@@ -20,6 +20,10 @@ OptionParser.new do |opts|
options[:port] = value
end
+ opts.on("-s", "--socket PATH", String, "Unix socket path to listen on") do |value|
+ options[:sock] = value
+ end
+
opts.on("--[no-]generate-keys", "Whether to generate actual keys or fake it (faster). Default: false.") do |value|
options[:generate_real_keys] = value
end