+ mode 0o644
+end
+
+template "/etc/cron.d/nominatim" do
+ action node[:nominatim][:state] == :off ? :delete : :create
+ source "nominatim.cron.erb"
+ owner "root"
+ group "root"
+ mode "0644"
+ variables :bin_directory => "#{source_directory}/utils", :mailto => email_errors
+end
+
+template "#{source_directory}/utils/nominatim-update" do
+ source "updater.erb"
+ user "nominatim"
+ group "nominatim"
+ mode 0o755
+ variables :bindir => build_directory,
+ :srcdir => source_directory,
+ :logfile => "#{node[:nominatim][:logdir]}/update.log",
+ :branch => node[:nominatim][:revision],
+ :update_stop_file => "#{basedir}/status/updates_disabled"
+end
+
+template "/etc/init.d/nominatim-update" do
+ source "updater.init.erb"
+ user "nominatim"
+ group "nominatim"
+ mode 0o755
+ variables :source_directory => source_directory