#!/bin/sh

set -e

case "$1" in
    purge)
    if dpkg-statoverride --list /var/log/defectdojo >/dev/null 2>&1
    then
	dpkg-statoverride --remove /var/log/defectdojo
    fi
    if dpkg-statoverride --list /var/lib/defectdojo >/dev/null 2>&1
    then
	dpkg-statoverride --remove /var/lib/defectdojo
    fi
    if dpkg-statoverride --list /etc/defectdojo >/dev/null 2>&1
    then
	dpkg-statoverride --remove /etc/defectdojo
    fi
    if dpkg-statoverride --list /etc/defectdojo/settings.dist.py >/dev/null 2>&1
    then
	dpkg-statoverride --remove /etc/defectdojo/settings.dist.py
    fi
    rm -rf /var/log/defectdojo /var/lib/defectdojo /usr/lib/defectdojo
    ;;
esac

#DEBHELPER#
