From afa10602ee541c58a5fa030af6cf613095d7798d Mon Sep 17 00:00:00 2001 From: Stephan Date: Thu, 18 Feb 2021 17:41:14 +0100 Subject: [PATCH] if configured, use stats_dir from config file otherwise fall back to hard-coded /var/lib/tirex/stats This allows #17 --- utils/tirex-create-stats-and-update-tiles.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/tirex-create-stats-and-update-tiles.sh b/utils/tirex-create-stats-and-update-tiles.sh index 18457f4..f831812 100755 --- a/utils/tirex-create-stats-and-update-tiles.sh +++ b/utils/tirex-create-stats-and-update-tiles.sh @@ -67,7 +67,10 @@ exec >>/var/log/tirex/tirex-create-stats-and-update-tiles.log 2>&1 [ -f /osm/update/osmupdate.lock ] && exit # directory where the statistics should go -DIR=/var/lib/tirex/stats +DIR=$(sed -n 's/^stats_dir=//p' /etc/tirex/tirex.conf) +if [ -z "$DIR" ]; then + DIR=/var/lib/tirex/stats +fi DATE=`date +%FT%H`