diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:23:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 01:23:54 +0000 |
commit | fe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173 (patch) | |
tree | 5f743c2fcc2c85b0363602a14ac3753bc5a19abc /debian/slapd.postrm | |
parent | Adding upstream version 2.4.47+dfsg. (diff) | |
download | openldap-fe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173.tar.xz openldap-fe2751bf1e0388ddfa3fdfa88ed70b2bc94e2173.zip |
Adding debian version 2.4.47+dfsg-3+deb10u7.debian/2.4.47+dfsg-3+deb10u7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/slapd.postrm')
-rw-r--r-- | debian/slapd.postrm | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/slapd.postrm b/debian/slapd.postrm new file mode 100644 index 0000000..4d7917a --- /dev/null +++ b/debian/slapd.postrm @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +# Load debconf if available (might have been removed before purging +# slapd) + +if [ -e "/usr/share/debconf/confmodule" ]; then + . /usr/share/debconf/confmodule +fi + +# Check if the user wants the database removed on purging slapd +remove_database_on_purge() { + db_get slapd/purge_database || RET=false + if [ "$RET" = "true" ]; then + return 0 + else + return 1 + fi +} + +if [ "$1" = "purge" ]; then + echo -n "Removing slapd configuration... " + rm -f /etc/ldap/slapd.conf 2>/dev/null || true + rm -rf /etc/ldap/slapd.d 2>/dev/null || true + echo "done." + + if remove_database_on_purge; then + echo -n "Purging OpenLDAP database... " + rm -rf /var/lib/ldap || true + echo done + fi +fi + +#DEBHELPER# + +exit 0 + |