mirror of https://github.com/fail2ban/fail2ban
76 lines
2.0 KiB
Bash
Executable File
76 lines
2.0 KiB
Bash
Executable File
#! /bin/sh
|
|
# postinst script for fail2ban
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
set -e
|
|
|
|
# summary of how this script can be called:
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
# <new-version>
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
# <failed-install-package> <version> `removing'
|
|
# <conflicting-package> <version>
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
# the debian-policy package
|
|
#
|
|
preversion=$2
|
|
|
|
case "$1" in
|
|
configure)
|
|
# To fix the bug in generated by previous version files permissions
|
|
LOG=/var/log/fail2ban.log
|
|
[ -f $LOG ] && chmod go-w $LOG
|
|
|
|
# Note regarding changed configuration file
|
|
if [ ! -z $preversion ] \
|
|
&& dpkg --compare-versions $preversion lt 0.5.4-6;
|
|
then
|
|
cat <<EOF
|
|
WARNING!
|
|
|
|
Configuration file /etc/fail2ban.conf, failregex configuration
|
|
parameter specificly, were changed in 0.5.4-5 to close reported
|
|
security breach, and in 0.5.4-6 to close few other bugs.
|
|
|
|
updating from <0.5.4-5
|
|
Unless configuration file (or corresponding failregex'es) gets updated,
|
|
security breach is not closed and corresponding warning will be reported
|
|
by the fail2ban (in the log files).
|
|
|
|
updating from <0.5.4-6
|
|
Bugs #329163, #331695 dealing with changed iptables rules
|
|
outside of fail2ban were fixed in 0.5.4-6, and require upgrade of the
|
|
configuration file (fwcheck option was introduced) to take full
|
|
advantage of the problem solution (otherwise some problems might
|
|
persist)
|
|
|
|
Please review the configuration file and make appropriate changes.
|
|
ENJOY!
|
|
|
|
EOF
|
|
fi
|
|
|
|
;;
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|
|
|
|
|