Index: head/security/crowdsec/Makefile =================================================================== --- head/security/crowdsec/Makefile (revision 569134) +++ head/security/crowdsec/Makefile (revision 569135) @@ -1,27 +1,29 @@ # $FreeBSD$ PORTNAME= crowdsec -PORTVERSION= 1.0.7 +PORTVERSION= 1.0.9 DISTVERSIONPREFIX= v CATEGORIES= security MAINTAINER= sbz@FreeBSD.org COMMENT= Crowdsec lightweight and collaborative security engine LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules GO_MODULE= github.com/crowdsecurity/crowdsec GO_BUILDFLAGS= -ldflags "-s -w \ -X github.com/crowdsecurity/crowdsec/pkg/cwversion.Version=${PORTVERSION}" GO_TARGET= ./cmd/crowdsec \ ./cmd/crowdsec-cli + +USE_RC_SUBR= crowdsec PLIST_FILES= bin/crowdsec \ bin/crowdsec-cli .include Index: head/security/crowdsec/distinfo =================================================================== --- head/security/crowdsec/distinfo (revision 569134) +++ head/security/crowdsec/distinfo (revision 569135) @@ -1,5 +1,5 @@ -TIMESTAMP = 1615033328 -SHA256 (go/security_crowdsec/crowdsec-v1.0.7/v1.0.7.mod) = 810ca243ce2951dd7ab23d955efc8f50410c94feb8babc47a783146a4c06c798 -SIZE (go/security_crowdsec/crowdsec-v1.0.7/v1.0.7.mod) = 3310 -SHA256 (go/security_crowdsec/crowdsec-v1.0.7/v1.0.7.zip) = 1d7f5956826096405b24684db3c924476ffb7fa02f5859af5a6a2c00d8b1d753 -SIZE (go/security_crowdsec/crowdsec-v1.0.7/v1.0.7.zip) = 29305256 +TIMESTAMP = 1616585825 +SHA256 (go/security_crowdsec/crowdsec-v1.0.9/v1.0.9.mod) = b95c6a35287b10ff019c2c3391bad1d0759415cf53cb7c0bfe7b154e479f6531 +SIZE (go/security_crowdsec/crowdsec-v1.0.9/v1.0.9.mod) = 3322 +SHA256 (go/security_crowdsec/crowdsec-v1.0.9/v1.0.9.zip) = 0b61f7e5ed162796d14636243ffcc8c8e336a3a3ee7891115141447c7626e8f7 +SIZE (go/security_crowdsec/crowdsec-v1.0.9/v1.0.9.zip) = 29314582 Property changes on: head/security/crowdsec/distinfo ___________________________________________________________________ Modified: fbsd:nokeywords ## -1 +1 ## -on \ No newline at end of property +yes \ No newline at end of property Index: head/security/crowdsec/files/crowdsec.in =================================================================== --- head/security/crowdsec/files/crowdsec.in (nonexistent) +++ head/security/crowdsec/files/crowdsec.in (revision 569135) @@ -0,0 +1,49 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: crowdsec +# REQUIRE: LOGIN DAEMON NETWORKING +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# crowdsec_enable (bool): Set it to YES to enable crowdsec agent. +# Default is "NO". +# crowdsec_config (str): Set the agent config path. +# Default is "%%PREFIX%%/etc/crowdsec/config.yaml". +# crowdsec_flags (str): Set the extra flags to run agent. +# Default is "" + +. /etc/rc.subr + +name=crowdsec +desc="Crowdsec Agent" +rcvar=crowdsec_enable + +load_rc_config $name + +: ${crowdsec_enable:="NO"} +: ${crowdsec_config:="%%PREFIX%%/etc/crowdsec/config.yaml"} +: ${crowdsec_flags:=""} + +pidfile=/var/run/${name}.pid +command="%%PREFIX%%/bin/${name}" +start_cmd="${name}_start" +configtest_cmd="${name}_configtest" +extra_commands="configtest reload" + +crowdsec_start() +{ + /usr/sbin/daemon -f -p ${pidfile} -t "${desc}" \ + ${command} -c ${crowdsec_config} ${crowdsec_flags} +} + +crowdsec_configtest() +{ + echo "Performing sanity check on ${name} configuration." + eval ${command} -c ${crowdsec_config} -t +} + +run_rc_command "$1" Property changes on: head/security/crowdsec/files/crowdsec.in ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property