2014-04-11 15:50:55 +00:00
|
|
|
description "fail2ban - ban hosts that cause multiple authentication errors"
|
|
|
|
|
2014-04-23 04:55:51 +00:00
|
|
|
start on filesystem and static-network-up
|
|
|
|
stop on runlevel [016]
|
2014-04-11 15:50:55 +00:00
|
|
|
|
2014-04-23 04:55:51 +00:00
|
|
|
expect fork
|
2014-04-19 21:12:20 +00:00
|
|
|
respawn
|
|
|
|
|
2014-04-23 04:55:51 +00:00
|
|
|
env RUNDIR=/var/run/fail2ban
|
|
|
|
|
2014-04-19 21:12:20 +00:00
|
|
|
pre-start script
|
2014-04-23 04:55:51 +00:00
|
|
|
test -d $RUNDIR || mkdir -p $RUNDIR
|
|
|
|
test ! -e $RUNDIR/fail2ban.sock || rm -f $RUNDIR/fail2ban.sock
|
2014-04-19 21:12:20 +00:00
|
|
|
end script
|
|
|
|
|
2014-04-23 04:55:51 +00:00
|
|
|
exec /usr/bin/fail2ban-client -f -x start
|
2014-04-19 21:12:20 +00:00
|
|
|
|
2014-04-19 22:10:19 +00:00
|
|
|
pre-stop exec /usr/bin/fail2ban-client stop
|
|
|
|
|
2014-04-23 04:55:51 +00:00
|
|
|
post-stop exec rm -f $RUNDIR/fail2ban.pid
|