From a9d8b62e90340f2747aac14ec75e609eb97253d6 Mon Sep 17 00:00:00 2001 From: Dinko Korunic Date: Wed, 27 Apr 2011 09:22:19 +0200 Subject: [PATCH] - vise informativnih poruka - dodan zaboravljeni postrm --- debian/postinst | 3 +++ debian/postrm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 debian/postrm diff --git a/debian/postinst b/debian/postinst index f34cc6a..86f1150 100755 --- a/debian/postinst +++ b/debian/postinst @@ -34,11 +34,13 @@ CONF=/etc/fail2ban/jail.conf if [ -e "$CONF" ]; then # enable ssh, pam-generic, sasl, proftpd and vsftpd service + echo "CN: Enabling SSH, PAM-generic, SASL, Proftpd and Vsftpd support" perl -ne 'if (/^\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /^enabled/) { $_ =~ s/^enabled\s+=\s+false/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \ cp_mv "$CONF.$$" "$CONF" rm -f "$CONF.$$" # enable dovecot service + echo "CN: Enabling full Dovecot support" cp -a "$CONF" "$CONF.$$" cp-update fail2ban-cn "$CONF.$$" < `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + purge) + # continue below + ;; + + *) + exit 0 + ;; +esac + +# import CN-functions +. /usr/share/carnet-tools/functions.sh + +CONF=/etc/fail2ban/jail.conf + +# remove us from inittab +echo "CN: Removing Dovecot support" +cp-update -r fail2ban-cn "$CONF" + +# restart the services +if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d fail2ban restart || exit $? +else + /etc/init.d/fail2ban restart || exit $? +fi + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 -- 1.7.10.4