From f552edd887794a5086dcf93d36f8f82d83553196 Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Thu, 1 Sep 2016 17:25:12 +0200 Subject: [Feature] Add common way to disable Lua modules --- src/plugins/lua/rspamd_update.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/lua/rspamd_update.lua') diff --git a/src/plugins/lua/rspamd_update.lua b/src/plugins/lua/rspamd_update.lua index 9af937263..c4f1a7e98 100644 --- a/src/plugins/lua/rspamd_update.lua +++ b/src/plugins/lua/rspamd_update.lua @@ -125,6 +125,10 @@ end -- Configuration part local section = rspamd_config:get_all_opt("rspamd_update") if section then + if section['enabled'] == false then + rspamd_logger.info('Module is disabled') + return + end local trusted_key each(function(k, elt) if k == 'priority' then @@ -153,4 +157,6 @@ if section then end end end, maps) +else + rspamd_logger.infox('Module is unconfigured') end -- cgit v1.2.3