]> git.openstreetmap.org Git - chef.git/blob - cookbooks/web/templates/default/statistics.erb
Disable warnings from the daiy statistics script
[chef.git] / cookbooks / web / templates / default / statistics.erb
1 #!/bin/sh
2
3 # Abort on error
4 set -e
5
6 # Make sure /usr/local/bin is on the path
7 export PATH=$PATH:/usr/local/bin
8
9 # Generate new statistics
10 <%= @ruby %> -W0 <%= @directory %>/script/statistics > <%= @directory %>/tmp/data_stats.html
11
12 # Move new statistics into place
13 mv -f <%= @directory %>/tmp/data_stats.html /store/rails/stats
14
15 # Mail statistics to Blackadder
16 mail -s "OpenStreetMap Statistics" blackadderajr@gmail.com < /store/rails/stats/data_stats.html