#
# Dynamically generated by Chef on <%= node["fqdn"] %>
#
# Local modifications will be overwritten by Chef.
#

# Service-specific configuration file for tomcat6. This will be sourced by
# the SysV init script after the global configuration file
# /etc/tomcat6/tomcat6.conf, thus allowing values to be overridden in
# a per-service manner.
#
# NEVER change the init script itself. To change values for all services make
# your changes in /etc/tomcat6/tomcat6.conf
#
# To change values for a specific service make your edits here.
# To create a new service create a link from /etc/init.d/<your new service> to
# /etc/init.d/tomcat6 (do not copy the init script) and make a copy of the
# /etc/sysconfig/tomcat6 file to /etc/sysconfig/<your new service> and change
# the property values so the two services won't conflict. Register the new
# service in the system as usual (see chkconfig and similars).
#

# Where your java installation lives
JAVA_HOME=<%= node["java"]["java_home"] %>

# Where your tomcat installation lives
CATALINA_BASE="<%= @base %>"
CATALINA_HOME="<%= @home %>"
JASPER_HOME="<%= @home %>"
CATALINA_TMPDIR="<%= @tmp_dir %>"

# You can pass some parameters to java here if you wish to
# chef-alfresco adds logic to parse java_options as a dictionary
# CLASS! <%= @java_options.class.name %>
<% if @java_options.class.name.include? 'Mash' -%>
  <% final_java_opts = '' -%>
  <% @java_options.each do |opts_name,opts_value| -%>
# <%= opts_name %> configuration
# JAVA_OPTS="${JAVA_OPTS} <%= opts_value %>"
    <% final_java_opts = "#{final_java_opts} #{opts_value}" -%>

  <% end -%>
# Final JAVA_OPTS
JAVA_OPTS="<%= final_java_opts %>"
<% else -%>
JAVA_OPTS="<%= @java_options %>"
<% end -%>

# What user should run tomcat
TOMCAT_USER="<%= @user %>"

# You can change your tomcat locale here
#LANG="en_US"

# Run tomcat under the Java Security Manager
SECURITY_MANAGER="<%= @use_security_manager %>"

# Time to wait in seconds, before killing process
#SHUTDOWN_WAIT="30"

# Whether to annoy the user with "attempting to shut down" messages or not
#SHUTDOWN_VERBOSE="false"

# Set the TOMCAT_PID location
#CATALINA_PID="/var/run/tomcat6.pid"

# JVM parameters passed only for start and run commands
CATALINA_OPTS="<%= @catalina_options %>"

# Endorse .jar files in this directory
JAVA_ENDORSED_DIRS="<%= @endorsed_dir %>"

# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)
