mode "775"
end
+directory "/store/planet/statistics" do
+ owner "www-data"
+ group "planet"
+ mode "775"
+end
+
template "/usr/local/bin/apache-latest-planet-filename" do
source "apache-latest-planet-filename.erb"
owner "root"
SetEnv SECRET_KEY_BASE <%= @secret_key_base %>
Alias /favicon.ico <%= node[:web][:base_directory] %>/rails/app/assets/favicons/favicon.ico
Alias /openlayers <%= node[:web][:base_directory] %>/static/openlayers
- Alias /stats /store/rails/stats
+ RedirectPermanent /stats https://planet.openstreetmap.org/statistics
Alias /user/image /store/rails/user/image
Alias /attachments /store/rails/attachments
<%= @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
:ignore_nonreadable => true,
:timeout => 3600,
:refuse_options => ["checksum"]
+ },
+ :statistics => {
+ :comment => "Statistics",
+ :path => "/store/planet/statistics",
+ :read_only => false,
+ :write_only => true,
+ :list => false,
+ :uid => "planet",
+ :gid => "planet",
+ :transfer_logging => false,
+ :nodes_allow => "roles:web-statistics"
}
}
}