Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2024 21:17:29 GMT
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 2ba0d51ff6a6 - main - security/crowdsec: fix "command not found" on install script
Message-ID:  <202409202117.48KLHTtR095694@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2ba0d51ff6a6322fa134f7cf77ea004b8a1e78cc

commit 2ba0d51ff6a6322fa134f7cf77ea004b8a1e78cc
Author:     marco <marco@crowdsec.net>
AuthorDate: 2024-09-20 21:13:59 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-09-20 21:17:22 +0000

    security/crowdsec: fix "command not found" on install script
    
    A command is called which is not on $PATH, this fixes it by calling a
    wrapper that also provides the (possibly custom) configuration path.
    
    PR:     281608
    Fixes:  858c9f19409a (update to 1.6.3)
---
 security/crowdsec/Makefile          | 1 +
 security/crowdsec/files/crowdsec.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/security/crowdsec/Makefile b/security/crowdsec/Makefile
index 538e98c54a04..48f864e77d2a 100644
--- a/security/crowdsec/Makefile
+++ b/security/crowdsec/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	crowdsec
 DISTVERSIONPREFIX=	v
 DISTVERSION=	1.6.3
+PORTREVISION=	1
 CATEGORIES=	security
 
 MAINTAINER=	marco@crowdsec.net
diff --git a/security/crowdsec/files/crowdsec.in b/security/crowdsec/files/crowdsec.in
index 42abf1d829eb..5e827add0062 100644
--- a/security/crowdsec/files/crowdsec.in
+++ b/security/crowdsec/files/crowdsec.in
@@ -91,7 +91,7 @@ crowdsec_precmd() {
     # If the hub is empty, install the freebsd collection and the private ip whitelist.
     # We don't ship the whitelist in the collection because
     # there are legitimate use cases for banning private ip ranges.
-    if [ "$(cscli hub list -o raw | wc -l)" -le 1 ]; then
+    if [ "$(cs_cli hub list -o raw | wc -l)" -le 1 ]; then
         cs_cli parsers install crowdsecurity/whitelists --error || :
         cs_cli collections install crowdsecurity/freebsd --error || :
     fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409202117.48KLHTtR095694>