*rulesdir = RSPAMD_RULESDIR,
*lualibdir = RSPAMD_LUALIBDIR,
*libdir = RSPAMD_LIBDIR;
+ const gchar *t;
gchar path_buf[PATH_MAX];
}
}
- if (vars) {
- gchar *t;
+ /* Try environment */
+ t = getenv ("PLUGINSDIR");
+ if (t) {
+ pluginsdir = t;
+ }
+
+ t = getenv ("RULESDIR");
+ if (t) {
+ rulesdir = t;
+ }
+
+ t = getenv ("LUALIBDIR");
+ if (t) {
+ lualibdir = t;
+ }
+ t = getenv ("LIBDIR");
+ if (t) {
+ libdir = t;
+ }
+
+ t = getenv ("RSPAMD_LIBDIR");
+ if (t) {
+ libdir = t;
+ }
+
+ if (vars) {
t = g_hash_table_lookup (vars, "PLUGINSDIR");
if (t) {
pluginsdir = t;