variables :base_url => node[:nominatim][:state] == "off" ? node[:fqdn] : "nominatim.openstreetmap.org",
:dbname => node[:nominatim][:dbname],
:flatnode_file => node[:nominatim][:flatnode_file],
variables :base_url => node[:nominatim][:state] == "off" ? node[:fqdn] : "nominatim.openstreetmap.org",
:dbname => node[:nominatim][:dbname],
:flatnode_file => node[:nominatim][:flatnode_file],
- cron_d "nominatim-update-maintenance-trigger" do
- minute "18"
- hour "1"
+ systemd_service "nominatim-update-maintenance-trigger" do
+ description "Trigger maintenance tasks for Nominatim DB"
+ exec_start "touch #{basedir}/status/update_maintenance"
- command "touch #{basedir}/status/update_maintenance"
- mailto email_errors
+ end
+
+ systemd_timer "nominatim-update-maintenance-trigger" do
+ action :create
+ description "Schedule maintenance tasks for Nominatim DB"
+ on_calendar "*-*-* 02:03:00 UTC"
+ end
+
+ service "nominatim-update-maintenance-trigger" do
+ action [:enable]