From: Vsevolod Stakhov Date: Thu, 24 Apr 2014 17:15:33 +0000 (+0100) Subject: Add WWWDIR macro to rspamd configuration. X-Git-Tag: 0.7.0~273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e713036bd37c2acab7090b2a16e75c662fbc37d3;p=thirdparty%2Frspamd.git Add WWWDIR macro to rspamd configuration. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b970df796b..1b23cf3339 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 fd57c88452..2b0c29b1f9 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 654d634765..d44f616360 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 2ca846ebd9..920de94e41 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); }