Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2019 11:55:40 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r503168 - in head/security/py-fail2ban: . files
Message-ID:  <201905311155.x4VBteoY081295@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Fri May 31 11:55:40 2019
New Revision: 503168
URL: https://svnweb.freebsd.org/changeset/ports/503168

Log:
  security/py-fail2ban: Fix rc script
  
  The rc.d script evaluates fail2ban_pidfile before rc.conf is read.
  
  This change moves those evaluations to the corect place allowing
  users to override the values via /etc/rc.conf as expected.
  
  PR:		236017
  Reported by:	<epopen gmail com>, Dmitry Wagin <dmitry.wagin ya ru>
  Submitted by:	<theis gmx at> (maintainer)
  MFH:		2019Q2

Modified:
  head/security/py-fail2ban/Makefile
  head/security/py-fail2ban/files/fail2ban.in

Modified: head/security/py-fail2ban/Makefile
==============================================================================
--- head/security/py-fail2ban/Makefile	Fri May 31 11:49:20 2019	(r503167)
+++ head/security/py-fail2ban/Makefile	Fri May 31 11:55:40 2019	(r503168)
@@ -2,6 +2,7 @@
 
 PORTNAME=	fail2ban
 PORTVERSION=	0.10.4
+PORTREVISION=	1
 CATEGORIES=	security python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 

Modified: head/security/py-fail2ban/files/fail2ban.in
==============================================================================
--- head/security/py-fail2ban/files/fail2ban.in	Fri May 31 11:49:20 2019	(r503167)
+++ head/security/py-fail2ban/files/fail2ban.in	Fri May 31 11:55:40 2019	(r503168)
@@ -8,14 +8,10 @@
 # fail2ban_enable="YES"
 # fail2ban_flags="<set as needed>"
 
-fail2ban_enable=${fail2ban_enable-"NO"}
-fail2ban_pidfile=${fail2ban_pidfile-"/var/run/fail2ban/fail2ban.pid"}
-
 . /etc/rc.subr
 
 name="fail2ban"
 rcvar=fail2ban_enable
-pidfile="${fail2ban_pidfile}"
 
 command="%%PREFIX%%/bin/fail2ban-server"
 command_interpreter="%%PYTHON_CMD%%"
@@ -24,6 +20,14 @@ client="%%PREFIX%%/bin/fail2ban-client"
 extra_commands="reload jailstatus"
 
 load_rc_config ${name}
+
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+# SET THEM IN THE /etc/rc.conf FILE
+#
+
+fail2ban_enable=${fail2ban_enable-"NO"}
+pidfile=${fail2ban_pidfile-"/var/run/fail2ban/fail2ban.pid"}
 
 start_cmd="${client} ${fail2ban_flags} start"
 stop_cmd="${client} ${fail2ban_flags} stop"



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