diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:48:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:48:40 +0000 |
commit | ae09e15ef846b4b5b7664f375d31a2e635585aa6 (patch) | |
tree | 229bb55c1647dfa88110e88139294c1131b8e5c6 /debian/postgresql-common.postrm | |
parent | Adding upstream version 200+deb10u5. (diff) | |
download | postgresql-common-debian.tar.xz postgresql-common-debian.zip |
Adding debian version 200+deb10u5.debian/200+deb10u5debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/postgresql-common.postrm')
-rw-r--r-- | debian/postgresql-common.postrm | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/postgresql-common.postrm b/debian/postgresql-common.postrm new file mode 100644 index 0000000..caa8166 --- /dev/null +++ b/debian/postgresql-common.postrm @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +if [ remove = "$1" -o abort-install = "$1" -o disappear = "$1" ]; then + dpkg-divert --package postgresql-common --remove --rename --divert /usr/bin/pg_config.libpq-dev /usr/bin/pg_config +fi + +if [ "$1" = purge ]; then + # remove socket directory + rm -rf /var/run/postgresql + + # remove SSL keys + rm -rf /etc/postgresql-common/root.crt + + [ -d /etc/postgresql-common ] && rmdir --ignore-fail-on-non-empty /etc/postgresql-common || true + + rm -rf /var/cache/postgresql + + # unregister and remove files maintained by ucf + CCCONFIG="/etc/postgresql-common/createcluster.conf" + if which ucf >/dev/null; then + ucf --purge $CCCONFIG + fi + if which ucfr >/dev/null; then + ucfr --purge postgresql-common $CCCONFIG + fi + rm -f $CCCONFIG $CCCONFIG.ucf-* +fi + +#DEBHELPER# + |