imq.instanceconfig.version=300
<%
configs = {}
  configs.merge!(@resource.config)

  bridges = []
  services = []

  configs["imq.portmapper.port"] = @resource.port

  if @resource.admin_port
    services << "admin"
    configs["imq.admin.tcp.port"] = @resource.admin_port
  end

  if @resource.jms_port
    services << "jms"
    configs["imq.jms.tcp.port"] = @resource.jms_port
  end

  if @resource.stomp_port
    bridges << "stomp"
    configs["imq.bridge.stomp.tcp.enabled"] = "true"
    configs["imq.bridge.stomp.tcp.port"] = @resource.stomp_port
  end

  if services.size > 0
    configs["imq.service.activelist"] = services.join(',')
  end

  configs["imq.bridge.admin.user"] = @resource.admin_user
  user = @resource.users[@resource.admin_user]
  raise "Missing user details for admin user '#{@resource.admin_user}'" unless user
  configs["imq.bridge.admin.password"] = user[:password]
  configs["imq.imqcmd.password"] = user[:password]

  if bridges.size > 0
    configs["imq.bridge.enabled"] = "true"
    configs["imq.bridge.activelist"] = bridges.join(',')
  end
%>
<%= configs.sort.collect { |k, v| "#{k}=#{v}\n" }.join("") %>
imq.instanceconfig.version=300
<%
configs = {}
  configs["imq.log.timezone"] = node["tz"] || "GMT"

  configs.merge!(@resource.config)

  bridges = []
  services = []

  configs["imq.portmapper.port"] = @resource.port

  if @resource.admin_port
    services << "admin"
    configs["imq.admin.tcp.port"] = @resource.admin_port
  end

  if @resource.jms_port
    services << "jms"
    configs["imq.jms.tcp.port"] = @resource.jms_port
  end

  if @resource.stomp_port
    bridges << "stomp"
    configs["imq.bridge.stomp.tcp.enabled"] = "true"
    configs["imq.bridge.stomp.tcp.port"] = @resource.stomp_port
  end

  if services.size > 0
    configs["imq.service.activelist"] = services.join(',')
  end

  configs["imq.bridge.admin.user"] = @resource.admin_user
  user = @resource.users[@resource.admin_user]
  raise "Missing user details for admin user '#{@resource.admin_user}'" unless user
  configs["imq.bridge.admin.password"] = user[:password]
  configs["imq.imqcmd.password"] = user[:password]

  if bridges.size > 0
    configs["imq.bridge.enabled"] = "true"
    configs["imq.bridge.activelist"] = bridges.join(',')
  end
%>
<%= configs.sort.collect { |k, v| "#{k}=#{v}\n" }.join("") %>
Make sure the imq log timzone is configured as per nodes timezone
Make sure the imq log timzone is configured as per nodes timezone
