Index: Makefile =================================================================== --- Makefile (revision 525920) +++ Makefile (working copy) @@ -2,6 +2,7 @@ PORTNAME= fail2ban PORTVERSION= 0.11.1 +PORTREVISION= 1 CATEGORIES= security python PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Index: files/fail2ban.in =================================================================== --- files/fail2ban.in (revision 525920) +++ files/fail2ban.in (working copy) @@ -7,12 +7,16 @@ # Add the following lines to /etc/rc.conf to enable fail2ban: # fail2ban_enable="YES" # fail2ban_flags="" +# fail2ban_pidfile="" +# Make sure pidfile and socket point to the same directory + . /etc/rc.subr name="fail2ban" rcvar=fail2ban_enable +start_precmd="fail2ban_prestart" command="%%PREFIX%%/bin/fail2ban-server" command_interpreter="%%PYTHON_CMD%%" client="%%PREFIX%%/bin/fail2ban-client" @@ -19,6 +23,11 @@ extra_commands="reload jailstatus" +fail2ban_prestart() +{ + install -d -m 0755 "$(dirname ${pidfile})" +} + load_rc_config ${name} #