Reworks active monitoring to use require in place of dofile

This commit is contained in:
Simone Mainardi 2020-07-23 13:06:17 +02:00
parent ce1309853f
commit c923cc2c5c
2 changed files with 72 additions and 48 deletions

View file

@ -0,0 +1,20 @@
--
-- (C) 2014-20 - ntop.org
--
local lua_path_utils = {}
-- ########################################################
function lua_path_utils.package_path_preprend(path)
local include_path = path.."/?.lua;"
if not package.path:match(include_path) then
package.path = include_path..package.path
end
end
-- ########################################################
return lua_path_utils