#!/bin/sh
set -e

. /usr/share/debconf/confmodule

case "$1" in
    purge)
        ucf --purge /etc/slapos/slapos-node-unofficial.cfg || true
        db_get slapos-node-unofficial/software_root
        SOFTWARE_ROOT="$RET"

        rm -rf /etc/slapos/ /var/log/slapos/ /var/lib/slapos/ \
            /var/cache/slapos/certificates/ "$SOFTWARE_ROOT"
	;;
esac

#DEBHELPER#

exit 0
