-git "#{home_directory}/nominatim" do
- action :checkout
- repository node[:nominatim][:repository]
- enable_submodules true
- user "nominatim"
- group "nominatim"
- notifies :run, "execute[compile_nominatim]"
+directory wal_archives do
+ owner "postgres"
+ group "postgres"
+ mode 0700
+ only_if { node[:postgresql][:settings][:defaults][:archive_mode] == "on" }
+end
+
+template "/usr/local/bin/clean-db-nominatim" do
+ source "clean-db-nominatim.erb"
+ owner "root"
+ group "root"
+ mode 0755
+ variables :archive_dir => wal_archives,
+ :update_stop_file => "#{home_directory}/status/updates_disabled",
+ :streaming_clients => slaves
+ only_if { node[:postgresql][:settings][:defaults][:archive_mode] == "on" }