diff --git a/Dockerfile b/Dockerfile index deda2f3..e4734fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -153,8 +153,6 @@ RUN chmod +x /usr/bin/openstreetmap-tiles-update-expire \ && mkdir /var/log/tiles \ && chmod a+rw /var/log/tiles \ && ln -s /home/renderer/src/mod_tile/osmosis-db_replag /usr/bin/osmosis-db_replag \ -&& echo "SHELL=/bin/bash" > /etc/crontab \ -&& echo "BASH_ENV=/container.env" >> /etc/crontab \ && echo "* * * * * renderer openstreetmap-tiles-update-expire\n" >> /etc/crontab RUN mkdir /nodes \ diff --git a/openstreetmap-tiles-update-expire b/openstreetmap-tiles-update-expire index 3e114ea..c126570 100644 --- a/openstreetmap-tiles-update-expire +++ b/openstreetmap-tiles-update-expire @@ -59,10 +59,6 @@ EXPIRY_TOUCHFROM=13 EXPIRY_DELETEFROM=19 EXPIRY_MAXZOOM=20 - -REPLICATION_URL=${REPLICATION_URL:="https://planet.openstreetmap.org/replication/hour/"} -MAX_INTERVAL_SECONDS=${MAX_INTERVAL_SECONDS:="3600"} - #************************************************************************* #************************************************************************* @@ -111,11 +107,10 @@ freelock() if [ $# -eq 1 ] ; then m_info "Initialising Osmosis replication system to $1" 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 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 https://planet.openstreetmap.org/replication/minute/$url_dynamicPart.state.txt -O $WORKOSM_DIR/state.txt + $OSMOSIS_BIN --read-replication-interval-init workingDirectory=$WORKOSM_DIR 1>&2 2> "$OSMOSISLOG" + + wget "https://replicate-sequences.osm.mazdermind.de/?"$1"T00:00:00Z" -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 @@ -149,7 +144,7 @@ fi /bin/cp $WORKOSM_DIR/state.txt $WORKOSM_DIR/last.state.txt m_ok "downloading diff" - if ! $OSMOSIS_BIN -v 5 --read-replication-interval workingDirectory=$WORKOSM_DIR --simplify-change --write-xml-change $CHANGE_FILE 1>&2 2> "$OSMOSISLOG"; then + if ! $OSMOSIS_BIN --read-replication-interval workingDirectory=$WORKOSM_DIR --simplify-change --write-xml-change $CHANGE_FILE 1>&2 2> "$OSMOSISLOG"; then m_error "Osmosis error" fi diff --git a/run.sh b/run.sh index c28e932..1f9f8d4 100755 --- a/run.sh +++ b/run.sh @@ -2,8 +2,6 @@ set -euo pipefail -declare -p | grep -Ev 'BASHOPTS|BASH_VERSINFO|EUID|PPID|SHELLOPTS|UID' > /container.env - function createPostgresConfig() { cp /etc/postgresql/12/main/postgresql.custom.conf.tmpl /etc/postgresql/12/main/conf.d/postgresql.custom.conf sudo -u postgres echo "autovacuum = $AUTOVACUUM" >> /etc/postgresql/12/main/conf.d/postgresql.custom.conf