From: Dinko Korunic Date: Wed, 27 Apr 2011 07:22:19 +0000 (+0200) Subject: - vise informativnih poruka X-Git-Tag: v0.8.5~1 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=a9d8b62e90340f2747aac14ec75e609eb97253d6;p=fail2ban-cn.git - vise informativnih poruka - dodan zaboravljeni 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