summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorManuel Munz <freifunk@somakoma.de>2011-09-24 20:18:27 +0000
committerManuel Munz <freifunk@somakoma.de>2011-09-24 20:18:27 +0000
commit8d62398e854ba9e91059efb2e468a04d1ebaf5ef (patch)
tree27f14d51ede68f78ab82097b609d8b04a8211f69
parent42a129f669159eee467e1198bcd84f38257d14d3 (diff)
modules/freifunk: Remove old ff_mapupdate script
-rwxr-xr-xmodules/freifunk/root/etc/init.d/freifunk4
-rwxr-xr-xmodules/freifunk/root/usr/sbin/ff_mapupdate51
2 files changed, 0 insertions, 55 deletions
diff --git a/modules/freifunk/root/etc/init.d/freifunk b/modules/freifunk/root/etc/init.d/freifunk
index ed1364e001..5ffec43e83 100755
--- a/modules/freifunk/root/etc/init.d/freifunk
+++ b/modules/freifunk/root/etc/init.d/freifunk
@@ -19,10 +19,6 @@ boot() {
echo "0 */4 * * * /usr/sbin/ff_rdate" >> /etc/crontabs/root
}
- grep -q '/usr/sbin/ff_mapupdate' /etc/crontabs/root || {
- echo "17 * * * * /usr/sbin/ff_mapupdate" >> /etc/crontabs/root
- }
-
[ -d /etc/rc.local.d ] && {
for file in /etc/rc.local.d/*; do
test -f "$file" && . "$file"
diff --git a/modules/freifunk/root/usr/sbin/ff_mapupdate b/modules/freifunk/root/usr/sbin/ff_mapupdate
deleted file mode 100755
index 07fc66a8f9..0000000000
--- a/modules/freifunk/root/usr/sbin/ff_mapupdate
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/lua
-
-require("luci.fs")
-local uci = require "luci.model.uci"
-local x = uci.cursor()
-
-local update_url = "http://map.berlin.freifunk.net/freifunkmap.php?update=%.15f,%.15f&note=%s&olsrip=%s"
-local update_all = ( arg[1] and arg[1] == "all" ) and true or false
-
-local file
-x:foreach("olsrd", "LoadPlugin", function(s)
- if s.library == "olsrd_nameservice.so.0.3" then
- luci.fs.copy (s.latlon_file, "/tmp/ff_mapupdate.latlon")
- file = io.open("/tmp/ff_mapupdate.latlon")
- end
-end)
-
-if file then
- local ln
- local count = 0
- while true do
- ln = file:read("*l")
- if not ln then break end
- if update_all and ln:match("^Node%(") then
- local ip, lat, lon, note = ln:match("Node%('(%S+)',([%d%.]+),([%d%.]+),%d+,'%S+','(%S+)'%)")
- lat = tonumber(lat)
- lon = tonumber(lon)
-
- if ip and lat ~= 0.0 and lon ~= 0.0 and note then
- note = note:gsub("[^%w%-%.]+", "_")
- os.execute("wget -qO/dev/null %q" % string.format(update_url, lat, lon, note, ip))
- count = count + 1
- end
-
- elseif ln:match("^Self%(") then
- local ip, lat, lon, note = ln:match("Self%('(%S+)',([%d%.]+),([%d%.]+),%d+,'%S+','(%S+)'%)")
- lat = tonumber(lat)
- lot = tonumber(lon)
-
- if ip and lat ~= 0.0 and lon ~= 0.0 and note then
- note = note:gsub("[^%w%-%.]+", "_")
- os.execute("wget -qO/dev/null %q" % string.format(update_url, lat, lon, note, ip))
- count = count + 1
- end
- end
- end
-
- os.execute("logger -t 'mapupdate' 'Updated %d entries in freifunk map'" % count)
-
- file:close()
-end