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

24 lines
626 B
Bash
Raw Normal View History

2023-09-26 03:13:31 +02:00
#!/usr/bin/env bash
. /app/utils.sh
while :
do
2023-09-26 04:12:12 +02:00
regions="europe/great-britain"
style=""
2023-09-26 03:13:31 +02:00
[[ -n "$OSMGARMIN_REGIONS" ]] && regions="$OSMGARMIN_REGIONS"
[[ -n "$OSMGARMIN_STYLE" ]] && style="$OSMGARMIN_STYLE"
regions_array="$(echo $regions | tr ";" "\n")"
for region in $regions_array; do
if [[ "$(check_osm_update "$region")" == "true" ]]; then
/app/build-gmap.sh "$region" "$style"
2023-09-26 04:41:53 +02:00
# TODO: Tear this apart so we can update the maps and bounds separately,
# then build all the maps afterwards (less wasteful!)
2023-09-26 03:13:31 +02:00
fi
done
2023-09-26 04:41:53 +02:00
sleep 3600
2023-09-26 03:13:31 +02:00
done