diff --git a/security/crowdsec-firewall-bouncer/Makefile b/security/crowdsec-firewall-bouncer/Makefile index cc954af98728..60925f445797 100644 --- a/security/crowdsec-firewall-bouncer/Makefile +++ b/security/crowdsec-firewall-bouncer/Makefile @@ -1,39 +1,40 @@ PORTNAME= crowdsec-firewall-bouncer -PORTVERSION= 0.0.12 +PORTVERSION= 0.0.13 DISTVERSIONPREFIX= v CATEGORIES= security MAINTAINER= sbz@FreeBSD.org COMMENT= Crowdsec bouncer written in golang for firewalls LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= crowdsec>0:security/crowdsec USES= go:modules USE_RC_SUBR= crowdsec_firewall GO_MODULE= github.com/crowdsecurity/cs-firewall-bouncer GO_BUILDFLAGS= -ldflags "-s -w \ -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Version=v${PORTVERSION} \ - -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Tag=freebsd" + -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.Tag=freebsd \ + -X github.com/crowdsecurity/cs-firewall-bouncer/pkg/version.BuildDate=`date -u '+%Y-%m-%d_%I:%M:%S%p'`" SUB_FILES= pkg-message post-patch: ${REINPLACE_CMD} 's,$${BACKEND},pf,g' \ - ${WRKSRC}/config/cs-firewall-bouncer.yaml + ${WRKSRC}/config/crowdsec-firewall-bouncer.yaml do-install: @${MKDIR} ${STAGEDIR}${ETCDIR} - ${INSTALL_DATA} ${WRKSRC}/config/cs-firewall-bouncer.yaml \ - ${STAGEDIR}${ETCDIR}/cs-firewall-bouncer.yaml.sample + ${INSTALL_DATA} ${WRKSRC}/config/crowdsec-firewall-bouncer.yaml \ + ${STAGEDIR}${ETCDIR}/crowdsec-firewall-bouncer.yaml.sample ${INSTALL_PROGRAM} ${WRKDIR}/bin/crowdsec-firewall-bouncer \ - ${STAGEDIR}${PREFIX}/bin/cs-firewall-bouncer + ${STAGEDIR}${PREFIX}/bin/crowdsec-firewall-bouncer .include diff --git a/security/crowdsec-firewall-bouncer/distinfo b/security/crowdsec-firewall-bouncer/distinfo index ed0ddfb6c133..cf74c8b81d95 100644 --- a/security/crowdsec-firewall-bouncer/distinfo +++ b/security/crowdsec-firewall-bouncer/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1620824385 -SHA256 (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.12/v0.0.12.mod) = 62de12d4c417718ea7d7e009d7d06f103518c67e168db04c988808783e1e588d -SIZE (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.12/v0.0.12.mod) = 1335 -SHA256 (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.12/v0.0.12.zip) = 9a82915c2f2f8d4872ebfaf4cc6046cbdc1ab5af42e3a22a721b4a29007fa25c -SIZE (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.12/v0.0.12.zip) = 143391 +TIMESTAMP = 1625834541 +SHA256 (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.13/v0.0.13.mod) = c4ee3539ac5bd53f013e0798add577d5daef4480ad6910a3c35c381e74b26f63 +SIZE (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.13/v0.0.13.mod) = 935 +SHA256 (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.13/v0.0.13.zip) = 0817452582e7ff9f92ae7c51751c6de86a277d7b772e5ac1b35dc7a3ea35aba7 +SIZE (go/security_crowdsec-firewall-bouncer/crowdsec-firewall-bouncer-v0.0.13/v0.0.13.zip) = 148490 diff --git a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in index 48aa4cb1e16d..1bc55e6ca263 100755 --- a/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in +++ b/security/crowdsec-firewall-bouncer/files/crowdsec_firewall.in @@ -1,25 +1,30 @@ #!/bin/sh # # PROVIDE: crowdsec_firewall # REQUIRE: LOGIN DAEMON NETWORKING # KEYWORD: shutdown # +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# crowdsec_firewall_enable (bool): Set it to YES to enable crowdsec firewall. +# Default is "NO" . /etc/rc.subr name=crowdsec_firewall desc="Crowdsec Firewall" rcvar=crowdsec_firewall_enable load_rc_config $name -: ${crowdsec_firewall_enbable:="NO"} -: ${crowdsec_firewall_config:="%%PREFIX%%/etc/crowdsec-firewall-bouncer/cs-firewall-bouncer.yaml"} +: ${crowdsec_firewall_enable:="NO"} +: ${crowdsec_firewall_config:="%%PREFIX%%/etc/crowdsec-firewall-bouncer/crowdsec-firewall-bouncer.yaml"} pidfile=/var/run/$name.pid required_files="$crowdsec_firewall_config" -procname="%%PREFIX%%/bin/cs-firewall-bouncer" +procname="%%PREFIX%%/bin/crowdsec-firewall-bouncer" command=/usr/sbin/daemon command_args="-fp $pidfile -t '$desc' -- '$procname' -c '$crowdsec_firewall_config'" run_rc_command "$1" diff --git a/security/crowdsec-firewall-bouncer/files/pkg-message.in b/security/crowdsec-firewall-bouncer/files/pkg-message.in index 77449b1567d1..46710f5d090a 100644 --- a/security/crowdsec-firewall-bouncer/files/pkg-message.in +++ b/security/crowdsec-firewall-bouncer/files/pkg-message.in @@ -1,21 +1,21 @@ [ { type: install message: < persist # create crowdsec ipv6 table table persist # sysrc crowdsec_firewall_enable="YES" EOM } ] diff --git a/security/crowdsec-firewall-bouncer/pkg-plist b/security/crowdsec-firewall-bouncer/pkg-plist index d70a51ea77f3..d47d3e2429aa 100644 --- a/security/crowdsec-firewall-bouncer/pkg-plist +++ b/security/crowdsec-firewall-bouncer/pkg-plist @@ -1,2 +1,2 @@ -@sample etc/crowdsec-firewall-bouncer/cs-firewall-bouncer.yaml.sample -bin/cs-firewall-bouncer +@sample etc/crowdsec-firewall-bouncer/crowdsec-firewall-bouncer.yaml.sample +bin/crowdsec-firewall-bouncer