Fix for builtin endpoint when upgrading from 4.2 to 5.0

This commit is contained in:
Simone Mainardi 2021-07-21 15:42:50 +02:00
parent 591506aba1
commit 870a2f2bea

View file

@ -49,9 +49,12 @@ function recipients.initialize()
for _, category in pairs(checks.check_categories) do
all_categories[#all_categories + 1] = category.id
end
for endpoint_key, endpoint in pairs(endpoints.get_types()) do
if endpoint.builtin then
-- Delete (if existing) the old, string-keyed endpoint configuration
endpoints.delete_config("builtin_config_"..endpoint_key)
-- Add the configuration
local res = endpoints.add_config(
endpoint_key --[[ the type of the endpoint--]],