<% if node['zookeeper']['with_security'] then %>
FQDN=`hostname --fqdn`

export JVMFLAGS="-Dthis.fqdn=${FQDN} -Djava.security.auth.login.config=<%= @conf_dir %>/jaas.conf"
<% end %>

<%
this_file = 'java.env'
if defined? node['zookeeper']['extra_configs'][this_file] \
  && node['zookeeper']['extra_configs'][this_file] != nil then
  node['zookeeper']['extra_configs'][this_file].each do |key, value|
%>
export <%= key %>=<%= value %>
<%
  end
end
%>

