mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-16 11:14:42 +00:00
40 lines
1.1 KiB
Lua
40 lines
1.1 KiB
Lua
--
|
|
-- (C) 2013-21 - ntop.org
|
|
--
|
|
-- This script is used to perform activities that are low
|
|
-- priority with respect to second.lua but that require
|
|
-- near realtime execution.
|
|
-- This script is executed every 3 seconds
|
|
--
|
|
|
|
local dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
local scripts_triggers = require "scripts_triggers"
|
|
local now = os.time()
|
|
|
|
-- Check and possibly reload changed preferences
|
|
if(scripts_triggers.arePrefsChanged()) then
|
|
local prefs_reload_utils = require "prefs_reload_utils"
|
|
|
|
prefs_reload_utils.check_reload_prefs()
|
|
end
|
|
|
|
-- Check and possibly reload plugins
|
|
if(scripts_triggers.checkReloadPlugins(now)) then
|
|
local plugins_utils = require "plugins_utils"
|
|
|
|
plugins_utils.checkReloadPlugins(now)
|
|
end
|
|
|
|
if(scripts_triggers.checkReloadLists()) then
|
|
local lists_utils = require "lists_utils"
|
|
|
|
lists_utils.checkReloadLists()
|
|
end
|
|
|
|
if scripts_triggers.isRecordingAvailable() then
|
|
local recording_utils = require "recording_utils"
|
|
|
|
recording_utils.checkExtractionJobs()
|
|
end
|