#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

# setup

SUFFIX="osh.pbf"

PLANETDIR="/var/lib/planet"
PLANETPREV="${PLANETDIR}/planet-previous.${SUFFIX}"
PLANETCURR="${PLANETDIR}/planet.${SUFFIX}"
PLANETNEW="${PLANETDIR}/planet-new.${SUFFIX}"
PLANETTMP="${PLANETDIR}/planet-tmp.${SUFFIX}"

pyosmium-up-to-date -v -o "$PLANETNEW" "$PLANETCURR"
retval=$?

while [ $retval -eq 1 ]; do
    mv "$PLANETNEW" "$PLANETTMP"
    pyosmium-up-to-date -v -o "$PLANETNEW" "$PLANETTMP"
    retval=$?
    rm "$PLANETTMP"
done

if [ $retval -ne 0 ]; then
    exit $retval
fi

# cleanup

mv "$PLANETCURR" "$PLANETPREV"
mv "$PLANETNEW" "$PLANETCURR"

#!/bin/sh

# DO NOT EDIT - This file is being maintained by Chef

# setup

SUFFIX="osh.pbf"

PLANETDIR="/var/lib/planet"
PLANETPREV="${PLANETDIR}/planet-previous.${SUFFIX}"
PLANETCURR="${PLANETDIR}/planet.${SUFFIX}"
PLANETNEW="${PLANETDIR}/planet-new.${SUFFIX}"
PLANETTMP="${PLANETDIR}/planet-tmp.${SUFFIX}"

pyosmium-up-to-date -vvv -o "$PLANETNEW" "$PLANETCURR"
retval=$?

while [ $retval -eq 1 ]; do
    mv "$PLANETNEW" "$PLANETTMP"
    pyosmium-up-to-date -vvv -o "$PLANETNEW" "$PLANETTMP"
    retval=$?
    rm "$PLANETTMP"
done

if [ $retval -ne 0 ]; then
    exit $retval
fi

# cleanup

mv "$PLANETCURR" "$PLANETPREV"
mv "$PLANETNEW" "$PLANETCURR"

Increase log verbosity level of planet update
Increase log verbosity level of planet update

Increase verbosity level of pyosmium-up-to-date in /usr/local/bin/planet-update to help finding out why it fails so often.