ntopng/scripts/lua/admin/service_restart.lua
Alfredo Cardigliano 7556232dc0
Some checks are pending
Build / build (push) Waiting to run
CIFuzz / Fuzzing (address) (push) Waiting to run
CodeQL / Analyze-1 (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Rework LuaEngine: move pro functions
2026-06-18 17:12:34 +02:00

23 lines
384 B
Lua

--
-- (C) 2017-26 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
local json = require("dkjson")
sendHTTPHeader('application/json')
if not isAdministratorOrPrintErr() then
return
end
if ntop.serviceRestart then
ntop.serviceRestart()
end
res = { }
print(json.encode(res, nil, 1))