ports/167530: [fix included] fail2ban will never ever start with the given rc.d script
julien tayon
julien at tayon.net
Wed May 2 17:00:25 UTC 2012
>Number: 167530
>Category: ports
>Synopsis: [fix included] fail2ban will never ever start with the given rc.d script
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed May 02 17:00:24 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: julien tayon
>Release: 8.3
>Organization:
me myself & I
>Environment:
FreeBSD lupin 8.3-RELEASE FreeBSD 8.3-RELEASE #0: Mon Apr 9 21:23:18 UTC 2012 root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
fail2ban dont start
because /usr/local/etc/rc.d/fail2ban never could have ever worked
(anyone has ever tried to make it start ? )
>How-To-Repeat:
service fail2ban start
Ctrl+C (service is not backgrounded :/)
ps aux | grep fail[2] &> /dev/null && echo "QA tested!" || echo "Baka!"
>Fix:
vi /usr/local/etc/rc.d/fail2ban
#!/bin/sh
#
# PROVIDE: fail2ban
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable fail2ban:
# 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}"
server="/usr/local/bin/fail2ban-server"
command_interpreter="/usr/local/bin/python2.7"
client="/usr/local/bin/fail2ban-client"
extra_commands="reload jailstatus"
load_rc_config ${name}
start_cmd="${server} -b ${fail2ban_flags} start"
stop_cmd="${server} ${fail2ban_flags} stop"
reload_cmd="${server} ${fail2ban_flags} reload"
jailstatus_cmd="${server} ${fail2ban_flags} status"
run_rc_command "$1"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list