3 # DO NOT EDIT - This file is being maintained by Chef
7 PLANETDIR="<%= @directory %>/planet"
8 LOGDIR="${PLANETDIR}/log"
9 PLANETPREV="${PLANETDIR}/planet-previous.pbf"
10 PLANETCURR="${PLANETDIR}/planet.pbf"
11 PLANETNEW="${PLANETDIR}/planet-new.pbf"
12 PLANETTMP="${PLANETDIR}/planet-tmp.pbf"
16 exec > "${LOGDIR}/$(date +%Y%m%d-%H%M).log" 2>&1
18 pyosmium-up-to-date -v -o $PLANETNEW $PLANETCURR
21 while [ $retval -eq 1 ]; do
22 mv "$PLANETNEW" "$PLANETTMP"
23 pyosmium-up-to-date -v -o $PLANETNEW $PLANETTMP
28 if [ $retval -ne 0 ]; then
34 mv "$PLANETCURR" "$PLANETPREV"
35 mv "$PLANETNEW" "$PLANETCURR"
39 find "${LOGDIR}" -mtime +28 -delete