#! /bin/sh # postrm script for #PACKAGE# # # see: dh_installdeb(1) # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see /usr/share/doc/packaging-manual/ set -e # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. # Automatically added by dh_installinit if [ "$1" = "purge" ] ; then update-rc.d clamav-daemon remove >/dev/null fi # End automatically added section # remove AppArmor files if [ "$1" = "purge" ]; then rm -f "/etc/apparmor.d/disable/usr.sbin.clamd" || true rm -f "/etc/apparmor.d/force-complain/usr.sbin.clamd" || true rm -f "/etc/apparmor.d/local/usr.sbin.clamd" || true rmdir /etc/apparmor.d/local 2>/dev/null || true fi case "$1" in purge) LOGROTATE_FILE='/etc/logrotate.d/clamav-daemon' if [ -x "/usr/bin/ucf" ]; then ucf -p $LOGROTATE_FILE || true fi if [ -e "$LOGROTATE_FILE" ]; then rm -f $LOGROTATE_FILE fi for dir in /etc/clamav/ /var/log/clamav /var/lib/clamav/; do if [ -d "$dir" ]; then rmdir "$dir" --ignore-fail-on-non-empty || true fi done ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 0 esac exit 0