]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 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
diff --git a/3rdparty/modules/memcached/templates/memcached_sysconfig.erb b/3rdparty/modules/memcached/templates/memcached_sysconfig.erb
new file mode 100644 (file)
index 0000000..825d460
--- /dev/null
@@ -0,0 +1,57 @@
+<%-
+result = []
+if @verbosity
+  result << '-' + @verbosity.to_s
+end
+if @lock_memory
+  result << '-k'
+end
+if @listen_ip
+  result << '-l ' + @listen_ip
+end
+if @udp_port
+  result << '-U ' + @udp_port.to_s
+end
+if @item_size
+  result << '-I ' + @item_size.to_s
+end
+result << '-t ' + @processorcount.to_s
+
+# log to syslog via logger
+if @syslog && @logfile.empty?
+       result << '2>&1 |/bin/logger &'
+# log to log file
+elsif !@logfile.empty? && !@syslog
+  result << '>> ' + @logfile + ' 2>&1'
+end
+-%>
+<%- if scope['osfamily'] != 'Suse' -%>
+PORT="<%= @tcp_port %>"
+USER="<%= @user %>"
+MAXCONN="<%= @max_connections %>"
+<% Puppet::Parser::Functions.function('memcached_max_memory') -%>
+CACHESIZE="<%= scope.function_memcached_max_memory([@max_memory]) %>"
+OPTIONS="<%= result.join(' ') %>"
+<%- else -%>
+MEMCACHED_PARAMS="<%= result.join(' ') %>"
+
+## Path:        Network/WWW/Memcached
+## Description: username memcached should run as
+## Type:        string
+## Default:     "memcached"
+## Config:      memcached
+#
+# username memcached should run as
+#
+MEMCACHED_USER="<%= @user %>"
+
+## Path:        Network/WWW/Memcached
+## Description: group memcached should be run as
+## Type:        string
+## Default:     "memcached"
+## Config:      memcached
+#
+# group memcached should be run as
+#
+MEMCACHED_GROUP="<%= @user %>"
+<%- end -%>