X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/0255400f731f8a4ce49e9745c7f2baa0bec208b6..92b965efcd8f94ac50d057336aa0a4a5e79ed378:/cookbooks/web/templates/default/statistics.erb?ds=sidebyside diff --git a/cookbooks/web/templates/default/statistics.erb b/cookbooks/web/templates/default/statistics.erb index ccfe956cc..30a23a7ac 100644 --- a/cookbooks/web/templates/default/statistics.erb +++ b/cookbooks/web/templates/default/statistics.erb @@ -1,13 +1,16 @@ #!/bin/sh +# Abort on error +set -e + # Make sure /usr/local/bin is on the path export PATH=$PATH:/usr/local/bin # Generate new statistics -<%= @ruby %> <%= @directory %>/script/statistics > <%= @directory %>/tmp/data_stats.html +<%= @ruby %> -W0 <%= @directory %>/script/statistics > <%= @directory %>/tmp/data_stats.html # Move new statistics into place -mv -f <%= @directory %>/tmp/data_stats.html /store/rails/stats +rsync --quiet <%= @directory %>/tmp/data_stats.html planet.openstreetmap.org::statistics # Mail statistics to Blackadder -mail -s "OpenStreetMap Statistics" blackadderajr@gmail.com < /store/rails/stats/data_stats.html +mail -s "OpenStreetMap Statistics" blackadderajr@gmail.com < <%= @directory %>/tmp/data_stats.html