aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Mariani <marco@crowdsec.net>2023-10-17 07:05:20 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-10-19 07:07:30 +0000
commite7efe5be3fb2d0b3c3bf4738b82f5963e00bc94d (patch)
treec9c370a1462a1afcf950b65281fff025805e1ba6
parentecc6af150840d1b8b3fecc29d9deca7996401fc4 (diff)
downloadports-e7efe5be3fb2d0b3c3bf4738b82f5963e00bc94d.tar.gz
ports-e7efe5be3fb2d0b3c3bf4738b82f5963e00bc94d.zip
security/crowdsec-firewall-bouncer: include configuration patch
The update to 0.0.28 from PR 274213 did not include a file that sets backend mode in new installations. If the backend is not set, the application does not start. This version includes the missing patch file, and also sets the $BACKEND environment variable as a fallback. The application will substitute it at runtime if required. PR: 274213, 274529 Fixes: 714e7fb44f516d31f08b657b2eb9a66ae1fbf9c7
-rw-r--r--security/crowdsec-firewall-bouncer/Makefile1
-rw-r--r--security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in2
-rw-r--r--security/crowdsec-firewall-bouncer/files/patch-config_crowdsec-firewall-bouncer.yaml9
3 files changed, 12 insertions, 0 deletions
diff --git a/security/crowdsec-firewall-bouncer/Makefile b/security/crowdsec-firewall-bouncer/Makefile
index f4488f4953aa..2fe61b09bca2 100644
--- a/security/crowdsec-firewall-bouncer/Makefile
+++ b/security/crowdsec-firewall-bouncer/Makefile
@@ -1,4 +1,5 @@
PORTNAME= crowdsec-firewall-bouncer
+PORTREVISION= 1
DISTVERSIONPREFIX= v
DISTVERSION= 0.0.28
CATEGORIES= security
diff --git a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in
index dd2e10d6f918..78fed46c27f2 100644
--- a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in
+++ b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in
@@ -83,6 +83,8 @@ crowdsec_firewall_stop()
}
crowdsec_firewall_start() {
+ # ensure we have a backend if the config file was not patched
+ export BACKEND=pf
/usr/sbin/daemon -f -p "$pidfile" -t "$desc" -- \
"$command" -c "$crowdsec_firewall_config" ${crowdsec_firewall_flags}
}
diff --git a/security/crowdsec-firewall-bouncer/files/patch-config_crowdsec-firewall-bouncer.yaml b/security/crowdsec-firewall-bouncer/files/patch-config_crowdsec-firewall-bouncer.yaml
new file mode 100644
index 000000000000..f09f44420eaa
--- /dev/null
+++ b/security/crowdsec-firewall-bouncer/files/patch-config_crowdsec-firewall-bouncer.yaml
@@ -0,0 +1,9 @@
+--- config/crowdsec-firewall-bouncer.yaml.orig 2023-07-31 19:34:51 UTC
++++ config/crowdsec-firewall-bouncer.yaml
+@@ -1,4 +1,5 @@
+-mode: ${BACKEND}
++mode: pf
++retry_initial_connect: true
+ update_frequency: 10s
+ log_mode: file
+ log_dir: /var/log/