2023-09-26 03:13:31 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
. /app/utils.sh
|
|
|
|
|
2023-09-26 05:02:17 +02:00
|
|
|
sleep_time=3600
|
2023-09-26 05:13:53 +02:00
|
|
|
sleep_time_fail=60
|
|
|
|
|
|
|
|
function wait() {
|
|
|
|
delay="$1"
|
|
|
|
echo "💤 Sleeping $delay seconds..."
|
|
|
|
sleep $delay
|
|
|
|
}
|
2023-09-26 05:02:17 +02:00
|
|
|
|
2023-09-26 03:13:31 +02:00
|
|
|
while :
|
|
|
|
do
|
2023-09-26 04:12:12 +02:00
|
|
|
regions="europe/great-britain"
|
|
|
|
style=""
|
2023-10-01 01:47:04 +02:00
|
|
|
first_run="true"
|
2023-09-26 03:13:31 +02:00
|
|
|
|
|
|
|
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
|
|
|
|
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
|
|
|
|
|
2023-09-26 05:01:15 +02:00
|
|
|
/app/build-gmap.sh "$regions" "$style"
|
2023-09-26 04:41:53 +02:00
|
|
|
|
2023-09-26 05:13:53 +02:00
|
|
|
if [[ $? == 0 ]]; then
|
|
|
|
wait $sleep_time
|
|
|
|
else
|
|
|
|
wait $sleep_time_fail
|
|
|
|
fi
|
2023-09-26 03:13:31 +02:00
|
|
|
done
|