Commit 26bbc015 authored by Markus Guenther's avatar Markus Guenther
Browse files

[FEATURE] Add start script for tika server

parent d062ae2a
......@@ -24,3 +24,4 @@ default['tomcat']['webapp_dir'] = "/var/lib/tomcat#{node['tomcat']['base_version
default['typo3_solr']['solr']['solr_home'] = '/srv/solr'
default['typo3_solr']['solr']['tika_home'] = '/srv/tika'
default['typo3_solr']['solr']['etc_init'] = '/etc/init'
\ No newline at end of file
......@@ -223,10 +223,20 @@ action :add do
end
# tika server
remote_file "#{node['typo3_solr']['solr']['tika_home']}/tika-server-#{new_resource.tika_server}" do
template "#{node['typo3_solr']['solr']['etc_init']}/tika-server.conf" do
source 'tika-server.conf.erb'
variables(:app => new_resource.tika_server)
owner node['tomcat']['user']
mode 0644
cookbook 'typo3_solr'
end
remote_file "#{node['typo3_solr']['solr']['tika_home']}/tika-server-#{new_resource.tika_server}.jar" do
source "#{tika_server_uri}/tika-server-#{new_resource.tika_server}.jar"
mode 0550
notifies :restart, 'service[tomcat]', :immediately
owner node['tomcat']['user']
only_if { Gem::Version.new(new_resource.tika_server) > Gem::Version.new('0.0.0') }
end
......
......@@ -2,7 +2,7 @@ actions :add, :remove
attribute :name, :kind_of => String, :name_attribute => true
attribute :solr, :kind_of => String, :default => '3.6.2'
attribute :tika_server, :kind_of => String, :default => '1.13'
attribute :tika_server, :kind_of => String, :default => '0.0.0'
attribute :extension, :kind_of => String, :default => '2.8'
attribute :plugin, :kind_of => String, :default => '0.0.0'
attribute :plugin_access, :kind_of => String, :default => '0.0.0'
......
description "Apache Tika Server"
start on filesystem or runlevel [2345]
stop on shutdown
respawn
respawn limit 3 12
exec java -jar <%= node['typo3_solr']['solr']['tika_home'] %>/tika-server-<%= @app %>.jar
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment