description "Memcached instance <%= @instance -%>"

start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5

exec /usr/bin/memcached \
  -m <%= @memory %> \
  -U <%= @udp_port %> \
  -p <%= @port %> \
  -u <%= @user %> \
  -l <%= @listen %> \
  -c <%= @maxconn %> \
  -I <%= @max_object_size %><% if @experimental_options.any? %> \
  -o <%= @experimental_options.join(', ') %><% end %><% if @threads %> \
  -t <%= @threads %><% end %>

description "Memcached instance <%= @instance -%>"

start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5

limit nofile <%= @ulimit -%> <%= @ulimit -%>

exec /usr/bin/memcached \
  -m <%= @memory %> \
  -U <%= @udp_port %> \
  -p <%= @port %> \
  -u <%= @user %> \
  -l <%= @listen %> \
  -c <%= @maxconn %> \
  -I <%= @max_object_size %><% if @experimental_options.any? %> \
  -o <%= @experimental_options.join(', ') %><% end %><% if @threads %> \
  -t <%= @threads %><% end %>

Add ulimit support to upstart
Add ulimit support to upstart

Signed-off-by: Tim Smith <764ef62106582a09ed09dfa0b6bff7c05fd7d1e4@chef.io>
