From: Grant Slater Date: Fri, 1 Nov 2024 18:51:26 +0000 (+0000) Subject: planet: do not keep previous planet around. X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/bc93c9480c09bbf77ef4076319ab6c75570301af?hp=ec4ff72f33f13089bc2f3cd64087ece880eb5135 planet: do not keep previous planet around. --- diff --git a/cookbooks/planet/templates/default/planet-update.erb b/cookbooks/planet/templates/default/planet-update.erb index 73a778bba..fbfc6592f 100644 --- a/cookbooks/planet/templates/default/planet-update.erb +++ b/cookbooks/planet/templates/default/planet-update.erb @@ -11,11 +11,14 @@ PLANETPREV="${PLANETDIR}/planet-previous.${SUFFIX}" PLANETCURR="${PLANETDIR}/planet.${SUFFIX}" PLANETNEW="${PLANETDIR}/planet-new.${SUFFIX}" +rm -f "$PLANETPREV" + pyosmium-up-to-date -vvv -o "$PLANETNEW" "$PLANETCURR" retval=$? while [ $retval -eq 1 ]; do mv "$PLANETCURR" "$PLANETPREV" + rm -f "$PLANETPREV" mv "$PLANETNEW" "$PLANETCURR" pyosmium-up-to-date -vvv -o "$PLANETNEW" "$PLANETCURR" retval=$? @@ -28,4 +31,5 @@ fi # cleanup mv "$PLANETCURR" "$PLANETPREV" +rm -f "$PLANETPREV" mv "$PLANETNEW" "$PLANETCURR"