summaryrefslogtreecommitdiff
path: root/user/rspamd/10-conf-split-workers.patch
blob: 505d2c72e04dc354064dfd3e73272949f35d97e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Since we split workers into subpackages, we have to split the main config
that defines workers to be loaded.

NOTE: This is intentionally done in patch file instead of modifying the config
with sed and generating the worker configs to avoid silent breakages when
upgrading the aport!

--- a/conf/rspamd.conf
+++ b/conf/rspamd.conf
@@ -35,33 +35,4 @@
     .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/logging.inc"
 }
 
-worker "normal" {
-    bind_socket = "localhost: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 = "localhost: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 "fuzzy" {
-    bind_socket = "localhost:11335";
-    count = -1; # Disable by default
-    .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"
-}
+.include(glob=true) "$CONFDIR/worker-*.conf"
--- /dev/null
+++ b/conf/worker-normal.conf
@@ -0,0 +1,8 @@
+# Included from top-level .conf file
+
+worker "normal" {
+    bind_socket = "localhost: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"
+}
--- /dev/null
+++ b/conf/worker-controller.conf
@@ -0,0 +1,8 @@
+# Included from top-level .conf file
+
+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"
+}
--- /dev/null
+++ b/conf/worker-proxy.conf
@@ -0,0 +1,8 @@
+# Included from top-level .conf file
+
+worker "rspamd_proxy" {
+    bind_socket = "localhost: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"
+}
--- /dev/null
+++ b/conf/worker-fuzzy.conf
@@ -0,0 +1,8 @@
+# Included from top-level .conf file
+
+worker "fuzzy" {
+    bind_socket = "localhost: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"
+}