]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/memcached/templates/memcached_sysconfig.erb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / memcached / templates / memcached_sysconfig.erb
1 <%-
2 result = []
3 if @verbosity
4   result << '-' + @verbosity.to_s
5 end
6 if @lock_memory
7   result << '-k'
8 end
9 if @listen_ip
10   result << '-l ' + @listen_ip
11 end
12 if @udp_port
13   result << '-U ' + @udp_port.to_s
14 end
15 if @item_size
16   result << '-I ' + @item_size.to_s
17 end
18 result << '-t ' + @processorcount.to_s
19
20 # log to syslog via logger
21 if @syslog && @logfile.empty?
22         result << '2>&1 |/bin/logger &'
23 # log to log file
24 elsif !@logfile.empty? && !@syslog
25   result << '>> ' + @logfile + ' 2>&1'
26 end
27 -%>
28 <%- if scope['osfamily'] != 'Suse' -%>
29 PORT="<%= @tcp_port %>"
30 USER="<%= @user %>"
31 MAXCONN="<%= @max_connections %>"
32 <% Puppet::Parser::Functions.function('memcached_max_memory') -%>
33 CACHESIZE="<%= scope.function_memcached_max_memory([@max_memory]) %>"
34 OPTIONS="<%= result.join(' ') %>"
35 <%- else -%>
36 MEMCACHED_PARAMS="<%= result.join(' ') %>"
37
38 ## Path:        Network/WWW/Memcached
39 ## Description: username memcached should run as
40 ## Type:        string
41 ## Default:     "memcached"
42 ## Config:      memcached
43 #
44 # username memcached should run as
45 #
46 MEMCACHED_USER="<%= @user %>"
47
48 ## Path:        Network/WWW/Memcached
49 ## Description: group memcached should be run as
50 ## Type:        string
51 ## Default:     "memcached"
52 ## Config:      memcached
53 #
54 # group memcached should be run as
55 #
56 MEMCACHED_GROUP="<%= @user %>"
57 <%- end -%>