aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-24 18:15:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-04-24 18:15:33 +0100
commite713036bd37c2acab7090b2a16e75c662fbc37d3 (patch)
tree2f6fa92e160d9f5d120eb584792da8b3a5fc7e0b
parent7126e571034a702eca00159f10b4753e7b10af2d (diff)
downloadrspamd-e713036bd37c2acab7090b2a16e75c662fbc37d3.tar.gz
rspamd-e713036bd37c2acab7090b2a16e75c662fbc37d3.zip
Add WWWDIR macro to rspamd configuration.
-rw-r--r--CMakeLists.txt4
-rw-r--r--conf/workers.conf3
-rw-r--r--config.h.in1
-rw-r--r--src/libserver/cfg_utils.c2
4 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b970df796..1b23cf333 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,10 @@ IF(NOT PLUGINSDIR)
SET(PLUGINSDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd")
ENDIF(NOT PLUGINSDIR)
+IF(NOT WWWDIR)
+ SET(WWWDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd/www")
+ENDIF(NOT WWWDIR)
+
# Set libdir
IF(NOT LIBDIR)
SET(LIBDIR lib/rspamd)
diff --git a/conf/workers.conf b/conf/workers.conf
index fd57c8845..2b0c29b1f 100644
--- a/conf/workers.conf
+++ b/conf/workers.conf
@@ -17,5 +17,6 @@ worker {
count = 1;
bind_socket = "localhost:11336";
password = "q1";
- secure_ip = "127.0.0.1";
+ secure_ip = "127.0.0.1";
+ static_dir = "${WWWDIR}";
}
diff --git a/config.h.in b/config.h.in
index 654d63476..d44f61636 100644
--- a/config.h.in
+++ b/config.h.in
@@ -226,6 +226,7 @@
#define RSPAMD_DBDIR "${DBDIR}"
#define RSPAMD_EXAMPLESDIR "${EXAMPLESDIR}"
#define RSPAMD_PLUGINSDIR "${PLUGINSDIR}"
+#define RSPAMD_WWWDIR "${WWWDIR}"
#define RSPAMD_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define RVERSION "${RSPAMD_VERSION}"
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c
index 2ca846ebd..920de94e4 100644
--- a/src/libserver/cfg_utils.c
+++ b/src/libserver/cfg_utils.c
@@ -701,6 +701,7 @@ rspamd_include_map_handler (const guchar *data, gsize len, void* ud)
#define RSPAMD_DBDIR_MACRO "DBDIR"
#define RSPAMD_LOGDIR_MACRO "LOGDIR"
#define RSPAMD_PLUGINSDIR_MACRO "PLUGINSDIR"
+#define RSPAMD_WWWDIR_MACRO "WWWDIR"
#define RSPAMD_PREFIX_MACRO "PREFIX"
#define RSPAMD_VERSION_MACRO "VERSION"
@@ -712,6 +713,7 @@ rspamd_ucl_add_conf_variables (struct ucl_parser *parser)
ucl_parser_register_variable (parser, RSPAMD_DBDIR_MACRO, RSPAMD_DBDIR);
ucl_parser_register_variable (parser, RSPAMD_LOGDIR_MACRO, RSPAMD_LOGDIR);
ucl_parser_register_variable (parser, RSPAMD_PLUGINSDIR_MACRO, RSPAMD_PLUGINSDIR);
+ ucl_parser_register_variable (parser, RSPAMD_WWWDIR_MACRO, RSPAMD_WWWDIR);
ucl_parser_register_variable (parser, RSPAMD_PREFIX_MACRO, RSPAMD_PREFIX);
ucl_parser_register_variable (parser, RSPAMD_VERSION_MACRO, RVERSION);
}