2020-06-20 18:54:12 -06:00
|
|
|
#!/bin/sh
|
|
|
|
#check for old default map tiles and change to the new map tiles if req'd
|
|
|
|
#will not change existing custom entries.
|
2023-12-06 13:17:39 -07:00
|
|
|
OLDTILES_1='http://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoiazVkbHEiLCJhIjoiY2lqMnlieTM4MDAyNXUwa3A2eHMxdXE3MiJ9.BRFvx4q2vi70z5Uu2zRYQw'
|
|
|
|
OLDTILES_2='http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg'
|
|
|
|
NEWTILES='http://tile.openstreetmap.org/{z}/{x}/{y}.png'
|
2020-06-20 18:54:12 -06:00
|
|
|
MAPTILESERVER=$(/sbin/uci -c /etc/config.mesh get aredn.@map[0].maptiles)
|
2023-12-06 13:17:39 -07:00
|
|
|
if [ "$MAPTILESERVER" = "$OLDTILES_1" -o "$MAPTILESERVER" = "$OLDTILES_2" ]; then
|
2020-06-20 18:54:12 -06:00
|
|
|
/sbin/uci -c /etc/config.mesh set aredn.@map[0].maptiles="$NEWTILES"
|
|
|
|
/sbin/uci -c /etc/config.mesh commit aredn
|
|
|
|
fi
|
|
|
|
exit 0
|