g_string_free (fpath, TRUE);
}
- /* Lua options */
- (void)rspamd_lua_post_load_config (cfg);
init_dynamic_config (cfg);
rspamd_url_init (cfg->tld_file);
#include "cfg_rcl.h"
#include "utlist.h"
#include "rspamd.h"
+#include "lua/lua_common.h"
static gboolean json = FALSE;
static gboolean compact = FALSE;
}
else {
/* Do post-load actions */
- rspamd_config_post_load (cfg, FALSE);
- ret = TRUE;
- }
-
- if (ret) {
+ rspamd_lua_post_load_config (cfg);
if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) {
ret = FALSE;
}
+
+ if (ret) {
+ ret = rspamd_config_post_load (cfg, FALSE);
+ }
}
if (ret) {
#include "cfg_file.h"
#include "cfg_rcl.h"
#include "rspamd.h"
+#include "lua/lua_common.h"
static gboolean quiet = FALSE;
static gchar *config = NULL;
}
else {
/* Do post-load actions */
- ret = rspamd_config_post_load (cfg, FALSE);
- }
+ rspamd_lua_post_load_config (cfg);
- if (ret) {
if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) {
ret = FALSE;
}
FALSE)) {
ret = FALSE;
}
+
+ if (ret) {
+ ret = rspamd_config_post_load (cfg, FALSE);
+ }
}
if (strict && ret) {
}
}
+ /*
+ * As some rules are defined in lua, we need to process them, then init
+ * modules and merely afterwards to init modules
+ */
+ rspamd_lua_post_load_config (cfg);
+
if (init_modules) {
rspamd_init_filters (cfg, FALSE);
}