#!/bin/sh
#
# Delete dhcpy6d's log files upon package purge.
#

set -e

case "$1" in
    purge)
        rm -f /var/log/dhcpy6d.log* /var/lib/dhcpy6d/volatile.sqlite
        # Taken from ucf's postrm example
        for ext in '' '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do
            rm -f "/etc/default/dhcpy6d$ext"
        done
        if command -v ucf >/dev/null; then
            ucf --purge /etc/default/dhcpy6d
        fi
        if command -v ucfr >/dev/null; then
            ucfr --purge dhcpy6d /etc/default/dhcpy6d
        fi
        ;;
esac

#DEBHELPER#
