mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Skip connectivity check if forced offline
This commit is contained in:
parent
2d259f3b76
commit
4e96ca6a39
1 changed files with 7 additions and 5 deletions
|
|
@ -17,11 +17,13 @@ require "lua_trace"
|
|||
local prefs_dump_utils = require "prefs_dump_utils"
|
||||
|
||||
-- Check connectivity
|
||||
local connectivity_utils = require "connectivity_utils"
|
||||
local online = connectivity_utils.checkConnectivity()
|
||||
if not online then
|
||||
traceError(TRACE_WARNING, TRACE_CONSOLE, "No connectivity detected, ntopng will run in offline mode")
|
||||
ntop.setOffline()
|
||||
if not ntop.isOffline() then -- Check if forced to offline by arg
|
||||
local connectivity_utils = require "connectivity_utils"
|
||||
local online = connectivity_utils.checkConnectivity()
|
||||
if not online then
|
||||
traceError(TRACE_WARNING, TRACE_CONSOLE, "No connectivity detected, ntopng will run in offline mode")
|
||||
ntop.setOffline()
|
||||
end
|
||||
end
|
||||
|
||||
-- Check and possibly restore preferences dumped to file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue