d/postinst: replace pvemailforward with proxmox-mail-forward

proxmox-mail-forward is a new helper binary in Rust intended to behave
essentially the same on PVE installations. It can also handle mixed
PBS+PVE installations.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2022-10-21 15:02:50 +02:00 committed by Wolfgang Bumiller
parent d2c78d138e
commit b632562c08

10
debian/postinst vendored
View File

@ -126,8 +126,14 @@ case "$1" in
pveam update || true
fi
if ! test -f /root/.forward || ! grep -q '|/usr/bin/pvemailforward' /root/.forward; then
echo '|/usr/bin/pvemailforward' >>/root/.forward
# Always try to clean old entry, even when proxmox-mail-forward entry is already present.
# This ensures it will still be cleaned after an upgrade following a downgrade.
if test -f /root/.forward; then
sed -i '\!|/usr/bin/pvemailforward!d' /root/.forward
fi
if ! test -f /root/.forward || ! grep -q '|/usr/bin/proxmox-mail-forward' /root/.forward; then
echo '|/usr/bin/proxmox-mail-forward' >>/root/.forward
fi
systemctl --system daemon-reload >/dev/null || true