DESTINATION ${CONFDIR}/${_rp})
ENDFOREACH(CONF_FILE)
-# Main config is special due to systemd
-IF(WANT_SYSTEMD_UNITS MATCHES "ON")
- SET(MAIN_CONF "conf/rspamd.systemd.conf")
-ELSE(WANT_SYSTEMD_UNITS MATCHES "ON")
- SET(MAIN_CONF "conf/rspamd.sysvinit.conf")
-ENDIF(WANT_SYSTEMD_UNITS MATCHES "ON")
+SET(MAIN_CONF "conf/rspamd.conf")
IF(BUILD_PORT)
INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" ".sample")
ELSE(BUILD_PORT)
INSTALL_IF_NOT_EXISTS(${MAIN_CONF} ${CONFDIR} "rspamd.conf" "")
ENDIF(BUILD_PORT)
-# Debian is also special
-IF(DEBIAN_BUILD)
- INSTALL_IF_NOT_EXISTS("conf/rspamd.sysvinit.conf" ${CONFDIR} "rspamd.sysvinit.conf" "")
-ENDIF(DEBIAN_BUILD)
IF(INSTALL_EXAMPLES MATCHES "ON")
INSTALL(FILES ${MAIN_CONF} DESTINATION ${EXAMPLESDIR})
ENDIF(INSTALL_EXAMPLES MATCHES "ON")
%else
BuildRequires: lua-devel
%endif
-%if 0%{?el6}
Requires: logrotate
+%if 0%{?el6}
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
Requires(postun): initscripts
Source1: %{name}.init
-Source2: %{name}.logrotate
%endif
+Source2: %{name}.logrotate
Source0: https://rspamd.com/downloads/%{name}-%{version}.tar.xz
Source3: 80-rspamd.preset
%if 0%{?el6}
%{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%{__install} -d -p -m 0755 %{buildroot}%{_localstatedir}/run/rspamd
+%endif
%{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -d -p -m 0755 %{buildroot}%{rspamd_logdir}
-%endif
%{__install} -d -p -m 0755 %{buildroot}%{rspamd_home}
%{__install} -p -D -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}/local.d/
%if 0%{?el6}
%{_initrddir}/%{name}
%dir %{_localstatedir}/run/rspamd
+%endif
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %{rspamd_logdir}
-%endif
%{_mandir}/man8/%{name}.*
%{_mandir}/man1/rspamc.*
%{_mandir}/man1/rspamadm.*
%{_bindir}/rspamc
%{_bindir}/rspamadm
%config(noreplace) %{rspamd_confdir}/%{name}.conf
-%config(noreplace) %{rspamd_confdir}/%{name}.sysvinit.conf
%config(noreplace) %{rspamd_confdir}/composites.conf
%config(noreplace) %{rspamd_confdir}/metrics.conf
%config(noreplace) %{rspamd_confdir}/mime_types.inc
%config(noreplace) %{rspamd_confdir}/worker-fuzzy.inc
%config(noreplace) %{rspamd_confdir}/worker-normal.inc
%config(noreplace) %{rspamd_confdir}/modules.d/*
-%config(noreplace) %{rspamd_confdir}/rspamd.systemd.conf
%attr(-, _rspamd, _rspamd) %dir %{rspamd_home}
%dir %{rspamd_rulesdir}/regexp
%dir %{rspamd_rulesdir}
# chkconfig: - 85 15
# description: rspamd is a spam filtering system
# processname: rspamd
-# config: /etc/rspamd/rspamd.sysvinit.conf
+# config: /etc/rspamd/rspamd.conf
# config: /etc/sysconfig/rspamd
# pidfile: /var/run/rspamd/rspamd.pid
rspamadm="/usr/bin/rspamadm"
prog=$(basename $rspamd)
-RSPAMD_CONF_FILE="/etc/rspamd/rspamd.sysvinit.conf"
+RSPAMD_CONF_FILE="/etc/rspamd/rspamd.conf"
RSPAMD_USER="_rspamd"
RSPAMD_GROUP="_rspamd"
--- /dev/null
+# System V init adopted top level configuration
+
+# Please don't modify this file as your changes might be overwritten with
+# the next update.
+#
+# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
+# parameters defined on the top level
+#
+# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
+# parameters defined on the top level
+#
+# For specific modules or configuration you can also modify
+# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
+# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
+#
+# See https://rspamd.com/doc/tutorials/writing_rules.html for details
+
+.include "$CONFDIR/common.conf"
+
+options {
+ pidfile = "$RUNDIR/rspamd.pid";
+ .include "$CONFDIR/options.inc"
+ .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
+ .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
+}
+
+logging {
+ type = "file";
+ filename = "$LOGDIR/rspamd.log";
+ .include "$CONFDIR/logging.inc"
+ .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
+ .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
+}
+
+worker {
+ bind_socket = "*:11333";
+ .include "$CONFDIR/worker-normal.inc"
+ .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
+ .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc"
+}
+
+worker {
+ bind_socket = "localhost:11334";
+ .include "$CONFDIR/worker-controller.inc"
+ .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
+ .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
+}
+
+worker "rspamd_proxy" {
+ bind_socket = "*:11332";
+ .include "$CONFDIR/worker-proxy.inc"
+ .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-proxy.inc"
+ .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-proxy.inc"
+}
+
+# Local fuzzy storage is disabled by default
+
+#worker {
+# bind_socket = "*:11335";
+# .include "$CONFDIR/worker-fuzzy.inc"
+# .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-fuzzy.inc"
+# .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-fuzzy.inc"
+#}
+++ /dev/null
-# Systemd enabled top level configuration file
-
-# Please don't modify this file as your changes might be overwritten with
-# the next update.
-#
-# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
-# parameters defined on the top level
-#
-# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
-# parameters defined on the top level
-#
-# For specific modules or configuration you can also modify
-# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
-# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
-#
-# See https://rspamd.com/doc/tutorials/writing_rules.html for details
-
-.include "$CONFDIR/common.conf"
-
-options {
- .include "$CONFDIR/options.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
-}
-
-logging {
- type = "console";
- systemd = true;
- .include "$CONFDIR/logging.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
-}
-
-worker "normal" {
- bind_socket = "*:11333";
- .include "$CONFDIR/worker-normal.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc"
-}
-
-worker "controller" {
- bind_socket = "localhost:11334";
- .include "$CONFDIR/worker-controller.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
-}
-
-worker "rspamd_proxy" {
- bind_socket = "*:11332";
- .include "$CONFDIR/worker-proxy.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-proxy.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-proxy.inc"
-}
\ No newline at end of file
+++ /dev/null
-# System V init adopted top level configuration
-
-# Please don't modify this file as your changes might be overwritten with
-# the next update.
-#
-# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
-# parameters defined on the top level
-#
-# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
-# parameters defined on the top level
-#
-# For specific modules or configuration you can also modify
-# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
-# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
-#
-# See https://rspamd.com/doc/tutorials/writing_rules.html for details
-
-.include "$CONFDIR/common.conf"
-
-options {
- pidfile = "$RUNDIR/rspamd.pid";
- .include "$CONFDIR/options.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/options.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/options.inc"
-}
-
-logging {
- type = "file";
- filename = "$LOGDIR/rspamd.log";
- .include "$CONFDIR/logging.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/logging.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
-}
-
-worker {
- bind_socket = "*:11333";
- .include "$CONFDIR/worker-normal.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-normal.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-normal.inc"
-}
-
-worker {
- bind_socket = "localhost:11334";
- .include "$CONFDIR/worker-controller.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-controller.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-controller.inc"
-}
-
-worker "rspamd_proxy" {
- bind_socket = "*:11332";
- .include "$CONFDIR/worker-proxy.inc"
- .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-proxy.inc"
- .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-proxy.inc"
-}
-
-# Local fuzzy storage is disabled by default
-
-#worker {
-# bind_socket = "*:11335";
-# .include "$CONFDIR/worker-fuzzy.inc"
-# .include(try=true; priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/worker-fuzzy.inc"
-# .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/worker-fuzzy.inc"
-#}
NAME=rspamd
DAEMON=/usr/bin/$NAME
RSPAMADM=/usr/bin/rspamadm
-DAEMON_ARGS="-c /etc/rspamd/rspamd.sysvinit.conf"
+DAEMON_ARGS="-c /etc/rspamd/rspamd.conf"
DESC="rapid spam filtering system"
PIDFILE=/run/rspamd/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME