#! /bin/sh
set -e

dpkg-maintscript-helper rm_conffile /etc/init.d/click-apparmor 0.2.6 -- "$@"
dpkg-maintscript-helper rm_conffile /etc/init/click-apparmor.conf 0.2.6 -- "$@"

#DEBHELPER#

if [ "$1" = "configure" ]; then
    . /lib/apparmor/functions
    # Discard the return code and just make sure the md5sums are updated
    # so on next boot the upstart/initscript will have updated md5sums and
    # won't clear out the cache. This does not affect system-image updates
    # since /etc/system-image/writable-paths is configured to prefer the
    # files on the device (and the apparmor upstart job handles this).
    compare_and_save_debsums click-apparmor || true
fi
