Skip to content

Commit

Permalink
Added restart rest (#8808)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoBiscosi committed Nov 12, 2024
1 parent 1257879 commit 6c80655
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions scripts/lua/rest/v2/get/ntopng/restart.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--
-- (C) 2013-24 - ntop.org
--
local dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path

local rest_utils = require("rest_utils")
local rc = rest_utils.consts.success.ok

if not isAdministratorOrPrintErr() then
rest_utils.answer(rest_utils.consts.err.not_granted)
return
end

ntop.serviceRestart()

rest_utils.answer(rc)

0 comments on commit 6c80655

Please sign in to comment.