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