pve-common/debian/postinst
Stoiko Ivanov 0bbe789c6a fix #2796: debian/postinst: check for existing /etc/aliases
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-06-15 15:38:34 +02:00

21 lines
314 B
Bash

#!/bin/sh
set -e
#DEBHELPER#
case "$1" in
configure)
if test -n "$2"; then
# TODO: remove once PVE 7.0 is released
if dpkg --compare-versions "$2" 'lt' '6.0-5' && [ -e /etc/aliases ]; then
sed -E -i -e 's/^www:(\w)/www: \1/' /etc/aliases
fi
fi
;;
esac
exit 0