postinst: simplify root's mail .forward check
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
b0e70271e5
commit
544221fa8a
9
debian/postinst
vendored
9
debian/postinst
vendored
@ -58,13 +58,8 @@ EOF
|
||||
pveam update || true
|
||||
fi
|
||||
|
||||
if test -f /root/.forward; then
|
||||
if ! grep -q '|/usr/bin/pvemailforward' /root/.forward; then
|
||||
echo -e "|/usr/bin/pvemailforward\n$(cat /root/.forward)" >/root/.forward.tmp
|
||||
mv /root/.forward.tmp /root/.forward
|
||||
fi
|
||||
else
|
||||
echo '|/usr/bin/pvemailforward' >/root/.forward
|
||||
if ! test -f /root/.forward || ! grep -q '|/usr/bin/pvemailforward' /root/.forward; then
|
||||
echo '|/usr/bin/pvemailforward' >>/root/.forward
|
||||
fi
|
||||
|
||||
if [ -f /etc/systemd/system/ceph.service ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user