ntopng/scripts/callbacks/housekeeping.lua
Luca Deri b44032933d Added shutdown.lua callback script to be executed during shutdown
RuntimePrefs are now dumped to disk via Lua and not C++
2017-09-20 23:03:21 +02:00

24 lines
631 B
Lua

--
-- (C) 2013-17 - 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 few seconds (default 3)
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
require "alert_utils"
require "slack_utils"
sendSlackMessages()
local prefs_changed = ntop.getCache("ntopng.prefs_changed")
if(prefs_changed == "true") then
-- First delete prefs_changed then dump data
ntop.delCache("ntopng.prefs_changed")
savePrefsToDisk()
end