Added cleanup command when deleting all configured VA

This commit is contained in:
Luca Deri 2023-08-17 17:48:37 +02:00
parent 7d3696c076
commit 7773906f1f

View file

@ -417,12 +417,11 @@ end
-- Function to delete host to scan
function vs_utils.delete_host_to_scan(host, scan_type, all)
if all then
ntop.delCache(host_to_scan_key)
ntop.delCache(host_scan_queue_key)
local path_to_s_result = get_report_path(scan_type, host, true)
os.execute("rm "..path_to_s_result)
else
local host_hash_key = vs_utils.get_host_hash_key(host, scan_type)
local path_to_s_result = get_report_path(scan_type, host, false)
os.remove(path_to_s_result)
@ -432,6 +431,8 @@ function vs_utils.delete_host_to_scan(host, scan_type, all)
return true
end
-- **********************************************************
-- Function to delete host to scan by id
function vs_utils.delete_host_to_scan_by_id(id)