#!/bin/sh set -e # Automatically added by dh_installsystemd/14.5 if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then deb-systemd-invoke stop 'fail2ban.service' >/dev/null || true fi # End automatically added section # Automatically added by dh_installinit/14.5 if [ -z "$DPKG_ROOT" ] && [ "$1" = remove ] && [ -x "/etc/init.d/fail2ban" ] ; then invoke-rc.d --skip-systemd-native fail2ban stop || exit 1 fi # End automatically added section # Automatically added by dh_installdeb/14.5 dpkg-maintscript-helper rm_conffile /etc/fail2ban/filter.d/sshd-ddos.conf 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/filter.d/postfix-sasl.conf 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/filter.d/postfix-rbl.conf 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/action.d/nftables-common.conf 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/action.d/iptables-common.conf 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/action.d/badips.conf 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/fail2ban/action.d/badips.py 1.1.1-1\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/bash_completion.d/fail2ban 1.1.1-1\~ -- "$@" dpkg-maintscript-helper mv_conffile /etc/monit/monitrc.d/fail2ban /etc/monit/conf-available/fail2ban 1.1.1-1\~ -- "$@" # End automatically added section # Automatically added by dh_python3 if command -v py3clean >/dev/null 2>&1 && python3 -c 'pass' 2>/dev/null; then py3clean -p fail2ban else dpkg -L fail2ban | sed -En -e '/^(.*)\/(.+)\.py$/s,,rm "\1/__pycache__/\2".*,e' find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir fi # End automatically added section