diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:16:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:16:14 +0000 |
commit | 318a1a2246a9f521e5a02313dcc1f6d68a0af7ec (patch) | |
tree | e28c79d572e488bf782444e31d81291b99ef1932 /debian/exim4-base.postrm | |
parent | Adding upstream version 4.96. (diff) | |
download | exim4-6e6c849c1f16d1756acecce7a9318ceed4505ed1.tar.xz exim4-6e6c849c1f16d1756acecce7a9318ceed4505ed1.zip |
Adding debian version 4.96-15+deb12u4.debian/4.96-15+deb12u4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/exim4-base.postrm | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/debian/exim4-base.postrm b/debian/exim4-base.postrm new file mode 100644 index 0000000..a0e6d8b --- /dev/null +++ b/debian/exim4-base.postrm @@ -0,0 +1,66 @@ +#!/bin/sh + +set -e + +if [ -e /usr/share/debconf/confmodule ] ; then + . /usr/share/debconf/confmodule + export debconfavailable="yes" +fi + +if [ -n "$EX4DEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +case "$1" in + remove) + # work around apt purging -base before even removing -daemon #261994. + # postrm is good enough, we just need the init-script which is a conffile. + if [ -x /etc/init.d/exim4 ]; then + if [ -n "$EX4DEBUG" ]; then + netstat -tulpen + ls -al /run/exim4/ + cat /run/exim4/exim.pid + pidof exim4 + fi + invoke-rc.d exim4 stop + if [ -n "$EX4DEBUG" ]; then + netstat -tulpen + ls -al /run/exim4/ + cat /run/exim4/exim.pid + pidof exim4 + if pidof exim4; then + echo >&2 "WARN: There are some exim4 processes still running after stopping exim" + fi + fi + fi + rm -f /var/lib/exim4/berkeleydbvers.txt \ + /var/spool/exim4/gnutls-params-2048 + ;; + purge) + update-rc.d exim4 remove > /dev/null + + # ask about purging mailqueue if debconf is available, keep it + # otherwise + if [ -e /var/spool/exim4/input ] \ + && ! rmdir /var/spool/exim4/input 2>/dev/null \ + && [ "$debconfavailable" = "yes" ]; then + db_version 2.0 + db_input medium exim4/purge_spool || true + db_go || true + db_get exim4/purge_spool + purge_spool="$RET" + if [ "${purge_spool}" = "true" ] ; then + rm -rf /var/spool/exim4/input + fi + fi + + # remove logs and pid-dir. + rm -rf /run/exim4 /var/log/exim4 /var/spool/exim4/msglog \ + /var/spool/exim4/db /var/spool/exim4/exim-process.info \ + /var/spool/exim4/gnutls-params* + rmdir /var/spool/exim4 /var/lib/exim4 2> /dev/null || true + ;; +esac + +#DEBHELPER# |