:logfile => "#{node[:nominatim][:logdir]}/update.log",
:branch => node[:nominatim][:revision],
:update_stop_file => "#{basedir}/status/updates_disabled",
- :update_maintenance_trigger => "#{basedir}/status/update_maintenance"
+ :update_maintenance_trigger => "#{basedir}/status/update_maintenance",
+ :qabindir => qa_bin_directory,
+ :qadatadir => qa_data_directory
end
template "/etc/init.d/nominatim-update" do
if [ -f "<%= @update_maintenance_trigger %>" ]; then
rm <%= @update_maintenance_trigger %>
./nominatim refresh --postcodes --threads 4 -v
+<% if node[:nominatim][:enable_qa_tiles] -%>
+ pushd <%= @qabindir %>
+ if python3 cli.py --execute-all; then
+ rm -rf "<%= @qadatadir %>/old"
+ if [ -d "<%= @qadatadir %>/current" ]; then
+ mv "<%= @qadatadir %>/current" "<%= @qadatadir %>/old"
+ fi
+ mv "<%= @qadatadir %>/new" "<%= @qadatadir %>/current"
+ fi
+ popd
+<% end -%>
fi
done