aredn/files/etc/uci-defaults/95_aredn_migrate_leafletjs

7 lines
427 B
Plaintext
Raw Normal View History

2022-03-16 20:42:26 -06:00
#!/bin/sh
if [ "$(/sbin/uci -c /etc/config.mesh -q get aredn.@map[0].leafletjs)" = "http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js" ]; then
/sbin/uci -c /etc/config.mesh -q set aredn.@map[0].leafletjs="http://unpkg.com/leaflet@0.7.7/dist/leaflet.js"
/sbin/uci -c /etc/config.mesh -q set aredn.@map[0].leafletcss="http://unpkg.com/leaflet@0.7.7/dist/leaflet.css"
/sbin/uci -c /etc/config.mesh -q commit aredn
fi