mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
Check for ntopctl existance
This commit is contained in:
parent
dc778da274
commit
2ef887195b
1 changed files with 6 additions and 0 deletions
|
|
@ -76,6 +76,12 @@ end
|
|||
--! @return true if service is available, false otherwise.
|
||||
function os_utils.hasService(service_name, ...)
|
||||
local cmd = ntopctl_cmd(service_name, "has-service", ...)
|
||||
local has_ntopctl = os_utils.execWithOutput("which ntopctl >/dev/null 2>/dev/null")
|
||||
|
||||
if has_ntopctl == nil then
|
||||
-- ntopctl is not available
|
||||
return false
|
||||
end
|
||||
|
||||
if not ntop.exists(NTOPNG_CONFIG_TOOL) then
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue