X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/eccb2fd351faa65302c80a86f5ba6798ecd0d90c..245c47e8eef7048456021c7e4b4dbb69489567f8:/cookbooks/web/recipes/gpx.rb diff --git a/cookbooks/web/recipes/gpx.rb b/cookbooks/web/recipes/gpx.rb index f74ac5036..370b3113f 100644 --- a/cookbooks/web/recipes/gpx.rb +++ b/cookbooks/web/recipes/gpx.rb @@ -8,7 +8,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -21,16 +21,18 @@ include_recipe "web::base" db_passwords = data_bag_item("db", "passwords") -package "gcc" -package "make" -package "pkg-config" -package "libarchive-dev" -package "libbz2-dev" -package "libexpat1-dev" -package "libgd2-noxpm-dev" -package "libmemcached-dev" -package "libpq-dev" -package "zlib1g-dev" +package %w[ + gcc + make + pkg-config + libarchive-dev + libbz2-dev + libexpat1-dev + libgd-dev + libmemcached-dev + libpq-dev + zlib1g-dev +] gpx_directory = "#{node[:web][:base_directory]}/gpx-import" pid_directory = node[:web][:pid_directory] @@ -46,7 +48,7 @@ end git gpx_directory do action :sync - repository "git://git.openstreetmap.org/gpx-import.git" + repository "https://git.openstreetmap.org/public/gpx-import.git" revision "live" user "rails" group "rails" @@ -72,14 +74,13 @@ systemd_service "gpx-import" do exec_start "#{gpx_directory}/src/gpx-import" exec_reload "/bin/kill -HUP $MAINPID" private_tmp true - private_devices true protect_system "full" protect_home true restart "on-failure" pid_file "#{pid_directory}/gpx-import.pid" end -if %w(database_offline database_readonly gpx_offline).include?(node[:web][:status]) +if %w[database_offline database_readonly gpx_offline].include?(node[:web][:status]) service "gpx-import" do action :stop end