From f3cea4d57df6fd007d2a08cb5c538395bcda59dc Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 2 Jan 2017 21:17:46 +0000 Subject: [PATCH] tilecache: fix token variable --- cookbooks/tilecache/recipes/default.rb | 2 +- .../templates/default/nginx_generate_tilecache_qos_map.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/tilecache/recipes/default.rb b/cookbooks/tilecache/recipes/default.rb index f18896479..5ba99381d 100644 --- a/cookbooks/tilecache/recipes/default.rb +++ b/cookbooks/tilecache/recipes/default.rb @@ -103,7 +103,7 @@ template "/usr/local/bin/nginx_generate_tilecache_qos_map" do owner "root" group "root" mode 0o750 - variables :web_passwords => web_passwords + variables :totp_key => web_passwords["totp_key"] end template "/etc/cron.d/tilecache" do diff --git a/cookbooks/tilecache/templates/default/nginx_generate_tilecache_qos_map.erb b/cookbooks/tilecache/templates/default/nginx_generate_tilecache_qos_map.erb index e6c17f8a9..16eeb080d 100755 --- a/cookbooks/tilecache/templates/default/nginx_generate_tilecache_qos_map.erb +++ b/cookbooks/tilecache/templates/default/nginx_generate_tilecache_qos_map.erb @@ -4,7 +4,7 @@ set -e NUM_TOKENS=4 # current + 4 VALID_TOKEN=3600 # in seconds -QOS_TOKENS=($(/usr/bin/oathtool --totp --window=${NUM_TOKENS} --time-step-size=${VALID_TOKEN}s <%= web_passwords[:totp_key] %>)) +QOS_TOKENS=($(/usr/bin/oathtool --totp --window=${NUM_TOKENS} --time-step-size=${VALID_TOKEN}s <%= totp_key %>)) # ${qos_tokens[3]/[-1] } = OSM.org exclusive / current # ${qos_tokens[2]/[-2] } = tile.openstreetmap.org default -- 2.39.5