aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
-rw-r--r--conf/common.conf2
2 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e20c93cf9..a1cdd6d6f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,10 @@ IF(NOT PLUGINSDIR)
SET(PLUGINSDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd")
ENDIF(NOT PLUGINSDIR)
+IF(NOT RULESDIR)
+ SET(RULESDIR "${PLUGINSDIR}/rules")
+ENDIF(NOT RULESDIR)
+
IF(NOT WWWDIR)
SET(WWWDIR "${CMAKE_INSTALL_PREFIX}/share/rspamd/www")
ENDIF(NOT WWWDIR)
@@ -1029,6 +1033,7 @@ SET(CONFFILES
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR})")
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${EXAMPLESDIR})")
INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${PLUGINSDIR}/lua)")
+INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${RULESDIR})")
# Install configs only if they are unchanged
LIST(LENGTH CONFFILES CONFLIST_COUNT)
@@ -1090,13 +1095,12 @@ IF(ENABLE_REDIRECTOR MATCHES "ON")
ENDIF(ENABLE_REDIRECTOR MATCHES "ON")
# Lua config
-INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR}/lua)")
-FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/conf/lua"
- "${CMAKE_CURRENT_SOURCE_DIR}/conf/lua/*.lua")
+FILE(GLOB_RECURSE LUA_CONFIGS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/rules"
+ "${CMAKE_CURRENT_SOURCE_DIR}/rules/*.lua")
FOREACH(LUA_CONF ${LUA_CONFIGS})
GET_FILENAME_COMPONENT(_rp ${LUA_CONF} PATH)
- INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${CONFDIR}/lua/${_rp})")
- INSTALL(FILES "conf/lua/${LUA_CONF}" DESTINATION ${CONFDIR}/lua/${_rp})
+ INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${RULESDIR}/${_rp})")
+ INSTALL(FILES "rules/${LUA_CONF}" DESTINATION ${RULESDIR}/${_rp})
ENDFOREACH(LUA_CONF)
# systemd unit
diff --git a/conf/common.conf b/conf/common.conf
index a298ac1d7..94e5eb481 100644
--- a/conf/common.conf
+++ b/conf/common.conf
@@ -1,6 +1,6 @@
# A common rspamd configuration file
-lua = "$CONFDIR/lua/rspamd.lua"
+lua = "$RULESDIR/rspamd.lua"
.include "$CONFDIR/metrics.conf"
.include "$CONFDIR/composites.conf"