Greatly reduces the number of open files in second.lua

This commit is contained in:
Simone Mainardi 2017-11-23 15:51:12 +01:00
parent 83a58ad016
commit 46439a8c02
5 changed files with 49 additions and 31 deletions

View file

@ -5,10 +5,11 @@
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "template"
require "lua_utils"
function initPrefs()
local pr = nil
local function initPrefs()
if pr == nil then
pr = ntop.getPrefs()
end