From e4eab3822fe257ed4a044390a04eaba9a126afcd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 1 Feb 2019 15:09:38 +0000 Subject: [Minor] Add warning about conflictin local files --- lualib/lua_cfg_transform.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'lualib') diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua index 717ce5a22..8a61dcd29 100644 --- a/lualib/lua_cfg_transform.lua +++ b/lualib/lua_cfg_transform.lua @@ -16,6 +16,7 @@ limitations under the License. local logger = require "rspamd_logger" local lua_util = require "lua_util" +local rspamd_util = require "rspamd_util" local function is_implicit(t) local mt = getmetatable(t) @@ -216,6 +217,21 @@ local function merge_groups(groups) return ret end +-- Checks configuration files for statistics +local function check_statistics_sanity() + local local_conf = rspamd_paths['LOCAL_CONFDIR'] + local local_stat = string.format('%s/local.d/%s', local_conf, + 'statistic.conf') + local local_bayes = string.format('%s/local.d/%s', local_conf, + 'classifier-bayes.conf') + + if rspamd_util.file_exists(local_stat) and + rspamd_util.file_exists(local_bayes) then + logger.warnx(rspamd_config, 'conflicting files %s and %s are found: '.. + 'Rspamd classifier configuration might be broken!', local_stat, local_bayes) + end +end + return function(cfg) local ret = false @@ -226,6 +242,8 @@ return function(cfg) ret = true end + check_statistics_sanity() + if not cfg.actions then logger.errx('no actions defined') else -- cgit v1.2.3 nu-overflow Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/lib/l10n/id.js
blob: 641430ac273df898068b76ddf62c226cbd04ca90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151