2
0
Fork 0
containerfiles/osm-garmin/app/daemon.sh

23 lines
347 B
Bash
Raw Normal View History

#!/usr/bin/env bash
. /app/utils.sh
sleep_time=3600
sleep_time_fail=60
function wait() {
delay="$1"
echo "💤 Sleeping $delay seconds..."
sleep $delay
}
while :
do
/app/build-gmap.sh "$OSMGARMIN_REGIONS" "$OSMGARMIN_STYLE"
if [[ $? == 0 ]]; then
wait $sleep_time
else
wait $sleep_time_fail
fi
done