modules/freifunk: Remove helper scripts, they moved to freifunk-common

This commit is contained in:
Manuel Munz 2011-09-29 09:35:44 +00:00
parent c3a028c76c
commit 2d0171d72c
4 changed files with 0 additions and 62 deletions

View file

@ -1,10 +0,0 @@
#!/bin/sh
test "$1" = "-h" && echo -e "Usage:\n\t$0 -h\n\t$0 [ { ip | hostname } ]" >&2 && exit 1
host="${1:-leipzig.freifunk.net}"
wget -O /dev/null http://$host/cgi-bin-dev-zero.bin
test "$?" = "1" && wget -O /dev/null http://$host/cgi-bin/dev-zero.bin
test "$?" = "1" && wget -O /dev/null http://$host/cgi-bin/luci/freifunk/status/zeroes
test "$?" = "1" && echo "$host: no zero download found..." && exit 1

View file

@ -1,3 +0,0 @@
#!/bin/sh
wget -q -O - http://localhost:2006/neighbours|sed -e's/LinkQuality/LQ/;s/Hysteresis/Hyst./;s/Willingness/Will./'

View file

@ -1,29 +0,0 @@
#!/usr/bin/lua
require "os"
require "io"
require "uci"
local fs = require "nixio.fs"
if fs.access("/var/run/olsrd.pid") then
local stamp, intv
local x = uci.cursor()
x:foreach("olsrd", "LoadPlugin",
function(s)
if s.library == "olsrd_watchdog.so.0.1" then
intv = tonumber(s.interval)
stamp = s.file
end
end)
if intv and fs.access(stamp) then
local systime = os.time()
local wdgtime = tonumber(io.lines(stamp)())
if not wdgtime or ( systime - wdgtime ) > ( intv * 2 ) then
os.execute("logger -t 'OLSR watchdog' 'Process died - restarting!'")
os.execute("/etc/init.d/olsrd restart")
end
end
end

View file

@ -1,20 +0,0 @@
#!/bin/sh
uci_get_one() {
for var in "$@"; do
uci -P /var/state get "$var" 2>/dev/null && break
done
}
local servers="$(uci_get_one 'network.wan.lease_timesrv') $(uci show timeserver | sed -ne 's/.*hostname=//p')"
if [ -n "$servers" ]; then
for server in $servers; do
rdate -s $server >/dev/null 2>/dev/null && \
logger -t rdate "Synced with $server" && break
logger -t rdate "Failed to sync with $server"
done
else
logger -t rdate "No usable time server found"
fi