diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2019-05-31 11:55:40 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2019-05-31 11:55:40 +0000 |
commit | 4e758e465da5484c44f21cef1f160e89f79a58a3 (patch) | |
tree | fc4cea0642be891bcdbbe5a233db15b6e3cc22eb /security/py-fail2ban | |
parent | c635a4a125b656d3ef36f5e7cac11aa54b9d9824 (diff) | |
download | ports-4e758e465da5484c44f21cef1f160e89f79a58a3.tar.gz ports-4e758e465da5484c44f21cef1f160e89f79a58a3.zip |
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
Notes
Notes:
svn path=/head/; revision=503168
Diffstat (limited to 'security/py-fail2ban')
-rw-r--r-- | security/py-fail2ban/Makefile | 1 | ||||
-rw-r--r-- | security/py-fail2ban/files/fail2ban.in | 12 |
2 files changed, 9 insertions, 4 deletions
diff --git a/security/py-fail2ban/Makefile b/security/py-fail2ban/Makefile index 06dd4eec3dff..d5fcd545aad4 100644 --- a/security/py-fail2ban/Makefile +++ b/security/py-fail2ban/Makefile @@ -2,6 +2,7 @@ PORTNAME= fail2ban PORTVERSION= 0.10.4 +PORTREVISION= 1 CATEGORIES= security python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/security/py-fail2ban/files/fail2ban.in b/security/py-fail2ban/files/fail2ban.in index ebaa0f8dd7bf..954d391fc0c2 100644 --- a/security/py-fail2ban/files/fail2ban.in +++ b/security/py-fail2ban/files/fail2ban.in @@ -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%%" @@ -25,6 +21,14 @@ 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" reload_cmd="${client} ${fail2ban_flags} reload" |