summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--conf/rspamd.conf.in (renamed from conf/rspamd.conf)4
2 files changed, 11 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 69ddd7d3d..e12ad0e96 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,9 @@ IF(NOT RSPAMD_USER)
ENDIF(NOT RSPAMD_USER)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0 FATAL_ERROR)
+# Default for SysV Init
+SET(RSPAMD_WORKER_NORMAL "*:11333")
+SET(RSPAMD_WORKER_CONTROLLER "*:11334")
SET_PROPERTY(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)
############################# OPTIONS SECTION #############################################
@@ -346,6 +349,9 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
ELSE(EXISTS "/etc/debian_version")
SET(LINUX_START_SCRIPT "rspamd_rh.in")
ENDIF(EXISTS "/etc/debian_version")
+ # Overwrite to conform systemd
+ SET(RSPAMD_WORKER_NORMAL "systemd:0")
+ SET(RSPAMD_WORKER_CONTROLLER "systemd:1")
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
@@ -394,6 +400,9 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
SET(CMAKE_INSTALL_RPATH "${PREFIX}/lib")
ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+# Create conf/rspamd.conf from template
+CONFIGURE_FILE(conf/rspamd.conf.in conf/rspamd.conf @ONLY)
+
# Now find libraries and headers
# Find lua libraries
diff --git a/conf/rspamd.conf b/conf/rspamd.conf.in
index 06dbe8599..db0ca9099 100644
--- a/conf/rspamd.conf
+++ b/conf/rspamd.conf.in
@@ -10,11 +10,11 @@ logging {
}
worker {
- bind_socket = "systemd:0";
+ bind_socket = "@RSPAMD_WORKER_NORMAL@";
.include "$CONFDIR/worker-normal.inc"
}
worker {
- bind_socket = "systemd:1";
+ bind_socket = "@RSPAMD_WORKER_CONTROLLER@";
.include "$CONFDIR/worker-controller.inc"
}