SET(RSPAMD_GROUP "nobody")
ENDIF(NOT RSPAMD_USER)
+# Default for SysV Init
+SET(RSPAMD_WORKER_NORMAL "*:11333")
+SET(RSPAMD_WORKER_CONTROLLER "*:11334")
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
SET_PROPERTY(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)
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")
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
+++ /dev/null
-.include "$CONFDIR/common.conf"
-
-options {
- .include "$CONFDIR/options.inc"
-}
-
-logging {
- type = "console";
- .include "$CONFDIR/logging.inc"
-}
-
-worker {
- bind_socket = "systemd:0";
- .include "$CONFDIR/worker-normal.inc"
-}
-
-worker {
- bind_socket = "systemd:1";
- .include "$CONFDIR/worker-controller.inc"
-}
--- /dev/null
+.include "$CONFDIR/common.conf"
+
+options {
+ .include "$CONFDIR/options.inc"
+}
+
+logging {
+ type = "console";
+ .include "$CONFDIR/logging.inc"
+}
+
+worker {
+ bind_socket = "@RSPAMD_WORKER_NORMAL@";
+ .include "$CONFDIR/worker-normal.inc"
+}
+
+worker {
+ bind_socket = "@RSPAMD_WORKER_CONTROLLER@";
+ .include "$CONFDIR/worker-controller.inc"
+}