Skip to content

Commit

Permalink
Merge branch 'vshn-feature-no-listen'
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed May 25, 2015
2 parents 2fb653a + 6e774c8 commit 5f3efdc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 6 additions & 1 deletion spec/classes/memcached_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
:install_dev => true,
:processorcount => 1
},
{
:listen_ip => '',
},
{
:pidfile => false,
},
Expand Down Expand Up @@ -177,7 +180,6 @@
)
expected_lines = [
"logfile #{param_hash[:logfile]}",
"-l #{param_hash[:listen_ip]}",
"-p #{param_hash[:tcp_port]}",
"-U #{param_hash[:udp_port]}",
"-u #{param_hash[:user]}",
Expand All @@ -193,6 +195,9 @@
else
expected_lines.push("-m 950")
end
if(param_hash[:listen_ip] != '')
expected_lines.push("-l #{param_hash[:listen_ip]}")
end
if(param_hash[:lock_memory])
expected_lines.push("-k")
end
Expand Down
3 changes: 3 additions & 0 deletions templates/memcached.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ logfile <%= @logfile -%>
# UNIX socket path to listen on
-s <%= @unix_socket %>
<% else -%>

<% if @listen_ip != '' -%>
# IP to listen on
-l <%= @listen_ip %>
<% end -%>

# TCP port to listen on
-p <%= @tcp_port %>
Expand Down

0 comments on commit 5f3efdc

Please sign in to comment.