network/fail2ban: Updated for version 0.10.0.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Nishant Limbachia 2017-09-24 10:48:43 +01:00 committed by David Spencer
parent a8b73487f5
commit 63b4dca52e
7 changed files with 36 additions and 19 deletions

View File

@ -3,4 +3,9 @@ too many password failures. It updates firewall rules to reject the
IP address. These rules can be defined by the user. Fail2Ban can read
multiple log files such as sshd, Apache web server, postfix and others.
To install the bash completion script, pass BASH_COMPLETION=yes to the
SlackBuild, for example
BASH_COMPLETION=yes ./fail2ban.SlackBuild
See README.SBo for configuration and upgrade help.

View File

@ -4,12 +4,12 @@ Once you install the package, you can start using fail2ban by:
Additionally, you can add the following to rc.local for automatic startup
if [ -x /etc/rc.d/rc.fail2ban ]; then
/etc/rc.d/rc.fail2ban start
/etc/rc.d/rc.fail2ban start
fi
and add the following to rc.local_shutdown to stop fail2ban at shutdown
if [ -x /etc/rc.d/rc.fail2ban ]; then
/etc/rc.d/rc.fail2ban stop
/etc/rc.d/rc.fail2ban stop
fi
The package contains logrotate script copied from fail2ban manual,
@ -63,4 +63,6 @@ upgraded to version 0.9.5
2/5/2017
upgraded to version 0.9.6
5/20/2017
upgraded to version 0.9.7
upgraded to version 0.9.7
9/23/2017
upgraded to version 0.10.0, added upstream bash completion script.

View File

@ -10,7 +10,7 @@ after = paths-overrides.local
syslog_mail = /var/log/maillog
syslog_mail_warn = /var/log/syslog
syslog_mail_warn = /var/log/maillog
syslog_authpriv = /var/log/secure

View File

@ -28,6 +28,7 @@ config etc/fail2ban/fail2ban.conf.new
config etc/fail2ban/jail.conf.new
config etc/fail2ban/paths-common.conf.new
config etc/fail2ban/paths-slackware.conf.new
config etc/bash_completion.d/fail2ban.new
for conf_file in etc/fail2ban/action.d/*.new; do
config $conf_file

View File

@ -26,10 +26,12 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM="fail2ban"
VERSION=${VERSION:-0.9.7}
VERSION=${VERSION:-0.10.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
BASH_COMPLETION=${BASH_COMPLETION:-no}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
@ -80,10 +82,17 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
# install startup script
install -D -m 0644 $CWD/rc.fail2ban $PKG/etc/rc.d/rc.fail2ban.new
# install slackware specific config file
install -D -m 0644 $CWD/config/paths-slackware.conf $PKG/etc/fail2ban/paths-slackware.conf.new
# remove non-slackware specific stuff
rm -f $PKG/etc/fail2ban/paths-{debian,fedora,freebsd,osx,opensuse}.conf.new
# remove non-slackware specific config files
rm -f $PKG/etc/fail2ban/paths-{arch,debian,fedora,freebsd,osx,opensuse}.conf.new
# install bash completion script if requested
if [ "$BASH_COMPLETION" = "yes" ]; then
install -D -m 0644 files/bash-completion $PKG/etc/bash_completion.d/fail2ban.new
fi
# install logrotate script
install -D -m 0644 files/fail2ban-logrotate $PKG/etc/logrotate.d/fail2ban.new
@ -92,11 +101,11 @@ install -D -m 0644 files/fail2ban-logrotate $PKG/etc/logrotate.d/fail2ban.new
mkdir -p $PKG/var/{run,lib}/fail2ban
# remove /usr/share/doc
rm -fr $PKG/usr/share/doc
rm -fr $PKG/usr/share
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CONTRIBUTING.md COPYING ChangeLog DEVELOP FILTERS MANIFEST \
README.md RELEASE THANKS TODO DEVELOP \
cp -a CONTRIBUTING.md COPYING ChangeLog DEVELOP FILTERS MANIFEST \
README.md RELEASE THANKS TODO \
doc/run-rootless.txt $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View File

@ -1,8 +1,8 @@
PRGNAM="fail2ban"
VERSION="0.9.7"
VERSION="0.10.0"
HOMEPAGE="https://github.com/fail2ban/fail2ban/"
DOWNLOAD="https://github.com/fail2ban/fail2ban/archive/0.9.7/fail2ban-0.9.7.tar.gz"
MD5SUM="5e9deaea5237382940d5d58f22ca607a"
DOWNLOAD="https://github.com/fail2ban/fail2ban/archive/0.10.0/fail2ban-0.10.0.tar.gz"
MD5SUM="0f504ae1f8af0ac0b600e34ff48eb374"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View File

@ -15,29 +15,29 @@
fail2ban_start() {
if [ -x /etc/rc.d/rc.fail2ban ]; then
echo "Starting fail2ban: "
### using -x option to remove any stale socket file.
printf "Starting fail2ban\n"
### using -x option to remove any stale socket file
/usr/bin/fail2ban-client -x start
fi
}
fail2ban_stop() {
echo "Stopping fail2ban"
printf "Stopping fail2ban\n"
/usr/bin/fail2ban-client stop
}
fail2ban_reload() {
echo "Reloading fail2ban"
printf "Reloading fail2ban\n"
/usr/bin/fail2ban-client reload
}
fail2ban_status() {
echo "Status: fail2ban"
printf "fail2ban Status\n"
/usr/bin/fail2ban-client status
}
fail2ban_ping() {
echo "Pinging fail2ban"
printf "Pinging fail2ban\n"
/usr/bin/fail2ban-client ping
}