aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lualib/rspamd_config_transform.lua6
-rw-r--r--src/rspamadm/configdump.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/lualib/rspamd_config_transform.lua b/lualib/rspamd_config_transform.lua
index 4f656ca9c..af3e8180e 100644
--- a/lualib/rspamd_config_transform.lua
+++ b/lualib/rspamd_config_transform.lua
@@ -209,6 +209,12 @@ local function convert_metric(cfg, metric)
for k, v in metric_pairs(metric.group) do
group_transform(cfg, k, v)
end
+ else
+ cfg.group = {
+ ungrouped = {
+ symbols = {}
+ }
+ }
end
if metric.symbol then
diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c
index 6f320dea1..60cd75c36 100644
--- a/src/rspamadm/configdump.c
+++ b/src/rspamadm/configdump.c
@@ -284,7 +284,6 @@ rspamadm_configdump (gint argc, gchar **argv)
}
else {
/* Do post-load actions */
- rspamd_lua_set_path (cfg->lua_state, cfg->rcl_obj, ucl_vars);
rspamd_lua_post_load_config (cfg);
if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) {
@@ -328,9 +327,5 @@ rspamadm_configdump (gint argc, gchar **argv)
}
}
- if (!ret) {
- exit (EXIT_FAILURE);
- }
-
- exit (EXIT_SUCCESS);
+ exit (ret ? EXIT_SUCCESS : EXIT_FAILURE);
}