From 99dc08768ec2b06bd5b597feb11161f13d37718b Mon Sep 17 00:00:00 2001 From: Greg Date: Thu, 17 Feb 2022 22:44:05 +0000 Subject: [PATCH] Revert "switch to using replication_url" This reverts commit 89d238b2d0b264e0a317e76789a7b6f34ecf4f60. --- README.md | 4 ---- openstreetmap-tiles-update-expire | 11 ++++------- run.sh | 3 +-- 3 files changed, 5 insertions(+), 13 deletions(-) mode change 100755 => 100644 openstreetmap-tiles-update-expire diff --git a/README.md b/README.md index 838ac27..c54efca 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,6 @@ If your import is an extract of the planet and has polygonal bounds associated w ``` docker run \ -e UPDATES=enabled \ - -e REPLICATION_URL=https://planet.openstreetmap.org/replication/minute/ \ - -e MAX_INTERVAL_SECONDS=60 \ -v /absolute/path/to/luxembourg.osm.pbf:/data.osm.pbf \ -v /absolute/path/to/luxembourg.poly:/data.poly \ -v openstreetmap-data:/var/lib/postgresql/12/main \ @@ -115,8 +113,6 @@ Given that you've set up your import as described in the *Automatic updates* sec ``` docker run \ -p 8080:80 \ - -e REPLICATION_URL=https://planet.openstreetmap.org/replication/minute/ \ - -e MAX_INTERVAL_SECONDS=60 \ -e UPDATES=enabled \ -v openstreetmap-data:/var/lib/postgresql/12/main \ -v openstreetmap-rendered-tiles:/var/lib/mod_tile \ diff --git a/openstreetmap-tiles-update-expire b/openstreetmap-tiles-update-expire old mode 100755 new mode 100644 index 5e2850e..3e114ea --- a/openstreetmap-tiles-update-expire +++ b/openstreetmap-tiles-update-expire @@ -113,15 +113,12 @@ if [ $# -eq 1 ] ; then mkdir -p $WORKOSM_DIR $OSMOSIS_BIN -v 5 --read-replication-interval-init workingDirectory=$WORKOSM_DIR 1>&2 2> "$OSMOSISLOG" - init_seq=$(pyosmium-get-changes --server $REPLICATION_URL -D $1) + init_seq=$(pyosmium-get-changes --server https://planet.openstreetmap.org/replication/minute/ -D $1) url_dynamicPart=$(printf %09d $init_seq | sed 's_\([0-9][0-9][0-9]\)\([0-9][0-9][0-9]\)\([0-9][0-9][0-9]\)_\1/\2/\3_') - wget $REPLICATION_URL/$url_dynamicPart.state.txt -O $WORKOSM_DIR/state.txt - - cat > /var/lib/mod_tile/.osmosis/configuration.txt <<- EOM -baseUrl=$REPLICATION_URL -maxInterval=$MAX_INTERVAL_SECONDS -EOM + wget https://planet.openstreetmap.org/replication/minute/$url_dynamicPart.state.txt -O $WORKOSM_DIR/state.txt + mv $WORKOSM_DIR/configuration.txt $WORKOSM_DIR/configuration_orig.txt + sed "s!baseUrl=http://planet.openstreetmap.org/replication/minute!baseUrl=https://planet.openstreetmap.org/replication/minute!" $WORKOSM_DIR/configuration_orig.txt > $WORKOSM_DIR/configuration.txt else # make sure the lockfile is removed when we exit and then claim it diff --git a/run.sh b/run.sh index ed181b3..c28e932 100755 --- a/run.sh +++ b/run.sh @@ -85,8 +85,7 @@ if [ "$1" = "import" ]; then REPLICATION_TIMESTAMP=$(cat /var/lib/mod_tile/replication_timestamp.txt) # initial setup of osmosis workspace (for consecutive updates) - sudo -E -u renderer openstreetmap-tiles-update-expire $REPLICATION_TIMESTAMP - + sudo -u renderer openstreetmap-tiles-update-expire $REPLICATION_TIMESTAMP fi # copy polygon file if available