diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:24:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:24:08 +0000 |
commit | f449f278dd3c70e479a035f50a9bb817a9b433ba (patch) | |
tree | 8ca2bfb785dda9bb4d573acdf9b42aea9cd51383 /distro/pkg/deb/knot.postrm | |
parent | Initial commit. (diff) | |
download | knot-aa9c0871046ffc355d61816f3f5b608b661cd589.tar.xz knot-aa9c0871046ffc355d61816f3f5b608b661cd589.zip |
Adding upstream version 3.2.6.upstream/3.2.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'distro/pkg/deb/knot.postrm')
-rw-r--r-- | distro/pkg/deb/knot.postrm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/distro/pkg/deb/knot.postrm b/distro/pkg/deb/knot.postrm new file mode 100644 index 0000000..14b3d69 --- /dev/null +++ b/distro/pkg/deb/knot.postrm @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +if test "$1" = "purge"; then + state_dir=/var/lib/knot + for db_name in "catalog" "confdb" "journal" "keys" "timers"; do + rm -rf $state_dir/$db_name >/dev/null 2>&1 || true + done + rmdir $state_dir >/dev/null 2>&1 || true + [ -e $state_dir/* ] && echo "Notice: there are still data in ${state_dir}, please check." + + dpkg-statoverride --remove /var/lib/knot >/dev/null 2>&1 || true + dpkg-statoverride --remove /etc/knot/knot.conf >/dev/null 2>&1 || true + dpkg-statoverride --remove /etc/knot >/dev/null 2>&1 || true + + deluser --quiet knot >/dev/null 2>&1 || true +fi + +#DEBHELPER# + +exit 0 |