diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-10-26 22:08:05 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-10-26 22:08:05 +0100 |
commit | 24ff611b744d26d7f95f9dd2f46292d774b0ab16 (patch) | |
tree | 8f3481b624dcd85f5918d301fc90129ca5535d7c /src/main.c | |
parent | fe231819debc54fdba7bb490537e90354be40f16 (diff) | |
download | rspamd-24ff611b744d26d7f95f9dd2f46292d774b0ab16.tar.gz rspamd-24ff611b744d26d7f95f9dd2f46292d774b0ab16.zip |
Allow xml->ucl config conversion.
Now it is possible to read UCL configs directly and convert legacy XML
to UCL by --convert-config option.
Default config is now rspamd.conf, not rspamd.xml.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 8f37f5cc9..6c4f0c318 100644 --- a/src/main.c +++ b/src/main.c @@ -75,6 +75,7 @@ static gboolean dump_vars = FALSE; static gboolean dump_cache = FALSE; static gboolean is_debug = FALSE; static gboolean is_insecure = FALSE; +static gchar *convert_config = FALSE; /* List of workers that are pending to start */ static GList *workers_pending = NULL; @@ -103,6 +104,7 @@ static GOptionEntry entries[] = { "test-lua", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &lua_tests, "Specify lua file(s) to test", NULL }, { "sign-config", 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &sign_configs, "Specify config file(s) to sign", NULL }, { "private-key", 0, 0, G_OPTION_ARG_FILENAME, &privkey, "Specify private key to sign", NULL }, + { "convert-config", 0, 0, G_OPTION_ARG_FILENAME, &convert_config, "Convert cnfiguration to UCL", NULL}, { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; @@ -754,7 +756,7 @@ load_rspamd_config (struct config_file *cfg, gboolean init_modules) struct filter *filt; struct module_ctx *cur_module = NULL; - if (! read_xml_config (cfg, cfg->cfg_name)) { + if (! read_rspamd_config (cfg, cfg->cfg_name, convert_config)) { return FALSE; } |