owner "root"
group "root"
mode "0644"
- variables :bin_directory => "#{source_directory}/utils", :mailto => email_errors
+ variables :bin_directory => "#{source_directory}/utils",
+ :mailto => email_errors,
+ :update_maintenance_trigger => "#{basedir}/status/update_maintenance"
end
template "#{source_directory}/utils/nominatim-update" do
:srcdir => source_directory,
:logfile => "#{node[:nominatim][:logdir]}/update.log",
:branch => node[:nominatim][:revision],
- :update_stop_file => "#{basedir}/status/updates_disabled"
+ :update_stop_file => "#{basedir}/status/updates_disabled",
+ :update_maintenance_trigger => "#{basedir}/status/update_maintenance"
end
template "/etc/init.d/nominatim-update" do
<% if node[:nominatim][:enable_backup] -%>
00 3 1 * * nominatim /usr/local/bin/backup-nominatim
<% end -%>
-30 1 * * * postgres /usr/local/bin/vacuum-db-nominatim
+20 0 * * * postgres /usr/local/bin/vacuum-db-nominatim
<% if node[:nominatim][:state] == "master" -%>
05 */4 * * * postgres /usr/local/bin/clean-db-nominatim
<% end -%>
+18 1 * * * nominatim touch <%= @update_maintenance_trigger %>