Changeset 6510 for luci/trunk/modules/freifunk/root/usr/sbin/ff_mapupdate
- Timestamp:
- 11/18/10 20:53:33 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
luci/trunk/modules/freifunk/root/usr/sbin/ff_mapupdate
r4599 r6510 1 1 #!/usr/bin/lua 2 2 3 require("luci.fs") 3 4 local uci = require "luci.model.uci" 4 5 local x = uci.cursor() 5 6 6 local update_url = "http:// www.layereight.de/freifunkmap.php?update=%.15f,%.15f&olsrip=%s¬e=%s&robot=%s"7 local update_url = "http://map.berlin.freifunk.net/freifunkmap.php?update=%.15f,%.15f¬e=%s&olsrip=%s" 7 8 local update_all = ( arg[1] and arg[1] == "all" ) and true or false 8 9 … … 10 11 x:foreach("olsrd", "LoadPlugin", function(s) 11 12 if s.library == "olsrd_nameservice.so.0.3" then 12 file = io.open(s.latlon_file) 13 luci.fs.copy (s.latlon_file, "/tmp/ff_mapupdate.latlon") 14 file = io.open("/tmp/ff_mapupdate.latlon") 13 15 end 14 16 end) … … 27 29 if ip and lat ~= 0.0 and lon ~= 0.0 and note then 28 30 note = note:gsub("[^%w%-%.]+", "_") 29 os.execute("wget -qO/dev/null %q" % string.format(update_url, lat, lon, ip, note, "luci-massupdate"))31 os.execute("wget -qO/dev/null %q" % string.format(update_url, lat, lon, note, ip)) 30 32 count = count + 1 31 33 end … … 38 40 if ip and lat ~= 0.0 and lon ~= 0.0 and note then 39 41 note = note:gsub("[^%w%-%.]+", "_") 40 os.execute("wget -qO/dev/null %q" % string.format(update_url, lat, lon, ip, note, "luci-selfupdate"))42 os.execute("wget -qO/dev/null %q" % string.format(update_url, lat, lon, note, ip)) 41 43 count = count + 1 42 44 end
