mirror of
https://github.com/gSpotx2f/luci-app-internet-detector.git
synced 2025-12-06 03:26:50 +03:00
Minor fixes
This commit is contained in:
@@ -347,9 +347,9 @@ function InternetDetector:main()
|
|||||||
signal.signal(signal.SIGUSR1, function(signo) self:resetUiCounter(signo) end)
|
signal.signal(signal.SIGUSR1, function(signo) self:resetUiCounter(signo) end)
|
||||||
|
|
||||||
local lastStatus, currentStatus, mTimeNow, mTimeDiff, mLastTime, uiTimeNow, uiLastTime
|
local lastStatus, currentStatus, mTimeNow, mTimeDiff, mLastTime, uiTimeNow, uiLastTime
|
||||||
local interval = self.serviceConfig.interval_up
|
local interval = self.serviceConfig.interval_up
|
||||||
local counter = 0
|
local counter = 0
|
||||||
local onStart = true
|
local onStart = true
|
||||||
RUNNING = true
|
RUNNING = true
|
||||||
while RUNNING do
|
while RUNNING do
|
||||||
if counter == 0 or counter >= interval then
|
if counter == 0 or counter >= interval then
|
||||||
@@ -441,12 +441,6 @@ function InternetDetector:status()
|
|||||||
return "stoped"
|
return "stoped"
|
||||||
end
|
end
|
||||||
|
|
||||||
function InternetDetector:poll()
|
|
||||||
local retCode = self:checkHosts()
|
|
||||||
return string.format('{"instances":[%s]}', self:statusJson(
|
|
||||||
retCode, self.serviceConfig.instance))
|
|
||||||
end
|
|
||||||
|
|
||||||
function InternetDetector:inetStatus()
|
function InternetDetector:inetStatus()
|
||||||
local inetStat = '{"instances":[]}'
|
local inetStat = '{"instances":[]}'
|
||||||
local ok, commonDir = pcall(dirent.files, self.commonDir)
|
local ok, commonDir = pcall(dirent.files, self.commonDir)
|
||||||
|
|||||||
Reference in New Issue
Block a user