#!/bin/sh
set -e

STATEDIR=/var/lib/dnscvsutil

case "$1" in
        purge)
                [ -d "$STATEDIR/domains" ] && rm -rf "$STATEDIR/domains"
                [ -d "$STATEDIR/compiled" ] && rm -rf "$STATEDIR/compiled"
		[ -d "$STATEDIR" ] && chown -R root.root /var/lib/dnscvsutil
                groupdel dnsadmin
                ;;
        *)
                ;;
esac
