8 if posix.access("/var/run/olsrd.pid") then
10 local x = uci.cursor()
12 x:foreach("olsrd", "LoadPlugin",
14 if s.library == "olsrd_watchdog.so.0.1" then
15 intv = tonumber(s.interval)
20 if intv and posix.access(stamp) then
21 local systime = os.time()
22 local wdgtime = tonumber(io.lines(stamp)())
24 if not wdgtime or ( systime - wdgtime ) > ( intv * 2 ) then
25 os.execute("logger -t 'OLSR watchdog' 'Process died - restarting!'")
26 os.execute("/etc/init.d/olsrd restart")