mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Reworks active monitoring to use require in place of dofile
This commit is contained in:
parent
ce1309853f
commit
c923cc2c5c
2 changed files with 72 additions and 48 deletions
20
scripts/lua/modules/lua_path_utils.lua
Normal file
20
scripts/lua/modules/lua_path_utils.lua
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue