#
# Cookbook Name:: memcached
# Attributes:: default
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

default['memcached']['memory'] = 64
default['memcached']['port'] = 11211
default['memcached']['listen'] = "0.0.0.0"
default['memcached']['maxconn'] = 1024
default['memcached']['max_object_size'] = "1m"
default['memcached']['logfilename'] = "memcached.log"
case node['platform_family']
when 'suse', 'fedora', 'rhel'
  default['memcached']['user'] = 'memcached'
  default['memcached']['group'] = 'memcached'
when 'debian', 'ubuntu'
  default['memcached']['user'] = 'memcache'
  default['memcached']['group'] = 'memcache'
else
  default['memcached']['user'] = 'nobody'
  default['memcached']['user'] = 'nogroup'
end

#
# Cookbook Name:: memcached
# Attributes:: default
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

default['memcached']['memory'] = 64
default['memcached']['port'] = 11211
default['memcached']['listen'] = "0.0.0.0"
default['memcached']['maxconn'] = 1024
default['memcached']['max_object_size'] = "1m"
default['memcached']['logfilename'] = "memcached.log"
case node['platform_family']
when 'suse', 'fedora', 'rhel'
  default['memcached']['user'] = 'memcached'
  default['memcached']['group'] = 'memcached'
when 'ubuntu'
  default['memcached']['user'] = 'memcache'
  default['memcached']['group'] = 'memcache'
when 'debian'
  default['memcached']['user'] = 'nobody'
  default['memcached']['group'] = 'nogroup'
else
  default['memcached']['user'] = 'nobody'
  default['memcached']['user'] = 'nogroup'
end

Fix debian user and group
[COOK-3682] Fix debian user and group

Debian package does not create a `memcache` user, and it uses `nobody` in default config file.

Signed-off-by: Seth Vargo <81550dbf04dfd8537ff7b3c014c6fbf86e0889dc@gmail.com>
