3 # DO NOT EDIT - This file is being maintained by Chef
5 date "+%c === Downloading and updating latest data from OSM"
9 # First execute any maintenance task that may be there.
11 for task in `find <%= @bindir %>/maintenance -type f,l`; do
12 date "+%c === Running maintenance task ${task}"
17 # Then catch up with the database.
19 num_cpus=`cat /proc/cpuinfo | grep -c processor`
20 num_cpus=$((num_cpus - 2))
21 current_load=`cat /proc/loadavg | cut -f 2 -d ' ' | sed 's:\..*::'`
23 if [[ $current_load -lt $num_cpus ]]
30 <%= @venvprefix %>nominatim replication --catch-up --threads $INST