summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2017-09-24 10:48:43 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-09-24 10:48:43 +0100
commit63b4dca52e53bd1d9460713d7078d557ef14a531 (patch)
tree8cbaf827cbfae83bd4cc6cf5a46a72edc2a959f7
parenta8b73487f5fabb6d05c43e4033d93eb4f30c55ea (diff)
downloadslackbuilds-63b4dca52e53bd1d9460713d7078d557ef14a531.tar.gz
network/fail2ban: Updated for version 0.10.0.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r--network/fail2ban/README5
-rw-r--r--network/fail2ban/README.SBo8
-rw-r--r--network/fail2ban/config/paths-slackware.conf2
-rw-r--r--network/fail2ban/doinst.sh1
-rw-r--r--network/fail2ban/fail2ban.SlackBuild21
-rw-r--r--network/fail2ban/fail2ban.info6
-rw-r--r--network/fail2ban/rc.fail2ban12
7 files changed, 36 insertions, 19 deletions
diff --git a/network/fail2ban/README b/network/fail2ban/README
index feb7e15c0c..f697e85496 100644
--- a/network/fail2ban/README
+++ b/network/fail2ban/README
@@ -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.
diff --git a/network/fail2ban/README.SBo b/network/fail2ban/README.SBo
index 6746497d95..f28a885b47 100644
--- a/network/fail2ban/README.SBo
+++ b/network/fail2ban/README.SBo
@@ -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 \ No newline at end of file
+upgraded to version 0.9.7
+9/23/2017
+upgraded to version 0.10.0, added upstream bash completion script.
diff --git a/network/fail2ban/config/paths-slackware.conf b/network/fail2ban/config/paths-slackware.conf
index 10a815731b..6bfd505303 100644
--- a/network/fail2ban/config/paths-slackware.conf
+++ b/network/fail2ban/config/paths-slackware.conf
@@ -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
diff --git a/network/fail2ban/doinst.sh b/network/fail2ban/doinst.sh
index 74390be489..ca16775b2e 100644
--- a/network/fail2ban/doinst.sh
+++ b/network/fail2ban/doinst.sh
@@ -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
diff --git a/network/fail2ban/fail2ban.SlackBuild b/network/fail2ban/fail2ban.SlackBuild
index ac72c6b007..b58fb1b345 100644
--- a/network/fail2ban/fail2ban.SlackBuild
+++ b/network/fail2ban/fail2ban.SlackBuild
@@ -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
diff --git a/network/fail2ban/fail2ban.info b/network/fail2ban/fail2ban.info
index 9b103a0b3b..2672d99b58 100644
--- a/network/fail2ban/fail2ban.info
+++ b/network/fail2ban/fail2ban.info
@@ -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=""
diff --git a/network/fail2ban/rc.fail2ban b/network/fail2ban/rc.fail2ban
index 0dc68048b4..001d698d35 100644
--- a/network/fail2ban/rc.fail2ban
+++ b/network/fail2ban/rc.fail2ban
@@ -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
}