# limitations under the License.
#
-user = 'cplanet'
-basedir = '/srv/cplanet'
-planet_source = 'https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf'
+user = "cplanet"
+basedir = "/srv/cplanet"
+planet_source = "https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf"
package %w[
pyosmium
]
directory basedir do
- owner 'root'
- group 'root'
+ owner "root"
+ group "root"
mode 0o755
end
%w[bin jobs log].each do |dir|
directory "#{basedir}/#{dir}" do
- owner 'root'
- group 'root'
+ owner "root"
+ group "root"
mode 0o755
end
end
%w[update update-planet].each do |file|
template "#{basedir}/bin/#{file}" do
source "#{file}.erb"
- owner 'root'
- group 'root'
+ owner "root"
+ group "root"
mode 0o755
variables :basedir => basedir, :user => user
end
mode 0o644
end
-cron 'update-planet' do
+cron "update-planet" do
hour 1
minute 17
- user 'root'
+ user "root"
command "#{basedir}/bin/update"
end
-