aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/rspamd_update.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-09-01 16:41:41 +0100
committerGitHub <noreply@github.com>2016-09-01 16:41:41 +0100
commit2d90a61b3a70bc75735575435276c9226c7f2c0f (patch)
tree3e4073dbcd20744cb02caa51d8b12d6e451bcae0 /src/plugins/lua/rspamd_update.lua
parent99c2eb287a15649c0dac67065b0254c2a94a768f (diff)
parentf552edd887794a5086dcf93d36f8f82d83553196 (diff)
downloadrspamd-2d90a61b3a70bc75735575435276c9226c7f2c0f.tar.gz
rspamd-2d90a61b3a70bc75735575435276c9226c7f2c0f.zip
Merge pull request #924 from fatalbanana/enabled
[Feature] Add common way to disable Lua modules
Diffstat (limited to 'src/plugins/lua/rspamd_update.lua')
-rw-r--r--src/plugins/lua/rspamd_update.lua6
1 files changed, 6 insertions, 0 deletions
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