Files
Stalwart/stalwart/DEBIAN/postrm
Cantibra 3814ae8fc7
All checks were successful
Stalwart / Stalwart (amd64, bookworm trixie noble, main, stalwart-x86_64-unknown-linux-gnu, stalwart-cli-x86_64-unknown-linux-gnu) (push) Successful in 1m35s
Stalwart / Stalwart (arm64, bookworm trixie noble, main, stalwart-aarch64-unknown-linux-gnu, stalwart-cli-aarch64-unknown-linux-gnu) (push) Successful in 1m14s
Initialize Git Repository: 'Stalwart'
2026-03-19 14:16:28 +01:00

36 lines
1.0 KiB
Bash

#!/bin/sh
set -e
set -u
if [ -d '/run/systemd/system' ]; then
/usr/bin/systemctl --system daemon-reload > '/dev/null' 2>&1 || \
/usr/bin/true
fi
case "${1}" in
remove)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper mask 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
;;
purge)
if [ -x '/usr/bin/deb-systemd-helper' ]; then
/usr/bin/deb-systemd-helper purge 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
/usr/bin/deb-systemd-helper unmask 'stalwart.service' > '/dev/null' 2>&1 || \
/usr/bin/true
fi
if /usr/bin/getent passwd 'stalwart' > '/dev/null' 2>&1; then
/usr/sbin/deluser 'stalwart' > '/dev/null' 2>&1
fi
if /usr/bin/getent group 'stalwart' > '/dev/null' 2>&1; then
/usr/sbin/deluser --group 'stalwart' > '/dev/null' 2>&1
fi
/usr/bin/rm --force --recursive '/var/lib/stalwart'
;;
esac
/usr/bin/rm --force --recursive '/var/log/stalwart'
/usr/bin/rm --force --recursive '/var/logrotate/stalwart'