mirror of https://github.com/aredn/aredn.git
Improve rss_monitor startup (#346) 04/27/2022
And shut down if we hae no wifi to monitor
This commit is contained in:
parent
3f2adcc002
commit
7aff95711e
|
@ -35,12 +35,15 @@
|
|||
--]]
|
||||
|
||||
function rssi_monitor()
|
||||
while true
|
||||
do
|
||||
if not string.match(get_ifname("wifi"), "^eth.") and nixio.sysinfo().uptime > 119 then
|
||||
if string.match(get_ifname("wifi"), "^eth.") then
|
||||
exit_app()
|
||||
else
|
||||
wait_for_ticks(math.max(1, 120 - nixio.sysinfo().uptime))
|
||||
while true
|
||||
do
|
||||
run_monitor()
|
||||
wait_for_ticks(60) -- 1 minute
|
||||
end
|
||||
wait_for_ticks(60) -- 1 minute
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue