aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-28 14:29:13 +0000
committerGitHub <noreply@github.com>2018-02-28 14:29:13 +0000
commit1b7a045c0643ad0dbea760d4a6296fff539606f6 (patch)
treeb4d3097662eac05a8e37cebfbad09dd614dca4fe /lualib
parent5b0b88edd1973e59bfa8bde701853c20d4cd383d (diff)
parentb057634b9f1f5142d4be7309e945c87c3ddb8469 (diff)
downloadrspamd-1b7a045c0643ad0dbea760d4a6296fff539606f6.tar.gz
rspamd-1b7a045c0643ad0dbea760d4a6296fff539606f6.zip
Merge pull request #2039 from fatalbanana/cwizard
[Minor] Config wizard: fix paths
Diffstat (limited to 'lualib')
-rw-r--r--lualib/rspamadm/configwizard.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/lualib/rspamadm/configwizard.lua b/lualib/rspamadm/configwizard.lua
index f4feab9e7..31c78a668 100644
--- a/lualib/rspamadm/configwizard.lua
+++ b/lualib/rspamadm/configwizard.lua
@@ -77,7 +77,7 @@ end
local function print_changes(changes)
local function print_change(k, c, where)
printf('File: %s, changes list:', highlight(local_conf .. '/'
- .. where .. '/'.. k .. '.conf'))
+ .. where .. '/'.. k))
for ek,ev in pairs(c) do
printf("%s => %s", highlight(ek), rspamd_logger.slog("%s", ev))
@@ -103,7 +103,7 @@ local function apply_changes(changes)
end
local function apply_change(k, c, where)
- local fname = local_conf .. '/' .. where .. '/'.. k .. '.conf'
+ local fname = local_conf .. '/' .. where .. '/'.. k
if not rspamd_util.file_exists(fname) then
printf("Create file %s", highlight(fname))
@@ -340,12 +340,12 @@ local function check_redis_classifier(cls, changes)
printf("Conversion failed")
else
printf("Conversion succeed")
- changes.l['classifier_bayes'] = {
+ changes.l['classifier-bayes.conf'] = {
new_schema = true,
}
if expire then
- changes.l['classifier_bayes'].expire = expire
+ changes.l['classifier-bayes.conf'].expire = expire
end
end
end
@@ -402,13 +402,13 @@ return ttl
symbol_ham, symbol_spam)
if ask_yes_no("Switch config to the new schema?", true) then
- changes.l['classifier_bayes'] = {
+ changes.l['classifier-bayes.conf'] = {
new_schema = true,
}
local expire = check_expire()
if expire then
- changes.l['classifier_bayes'].expire = expire
+ changes.l['classifier-bayes.conf'].expire = expire
end
end
end
@@ -452,17 +452,17 @@ local function setup_statistic(cfg, changes)
return false
end
rspamd_logger.messagex('Converted classifier to the from sqlite to redis')
- changes.l['classifier_bayes'] = {
+ changes.l['classifier-bayes.conf'] = {
backend = 'redis',
new_schema = true,
}
if expire then
- changes.l['classifier_bayes'].expire = expire
+ changes.l['classifier-bayes.conf'].expire = expire
end
if cls.learn_cache then
- changes.l['classifier_bayes'].cache = {
+ changes.l['classifier-bayes.conf'].cache = {
backend = 'redis'
}
end