Skip to content

Commit e86c525

Browse files
committed
Drop postfix from the list if exim should not be installed.
Fixes hestiacp#1995
1 parent d4db3c9 commit e86c525

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

install/hst-install-debian.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,14 @@ check_result $? "Unable to connect to the Hestia APT repository"
343343
# Check installed packages
344344
tmpfile=$(mktemp -p /tmp)
345345
dpkg --get-selections > $tmpfile
346-
for pkg in exim4 mariadb-server apache2 nginx hestia postfix; do
346+
conflicts_pkg="exim4 mariadb-server apache2 nginx hestia postfix"
347+
348+
# Drop postfix from the list if exim should not be installed
349+
if [ "$exim" = 'no' ]; then
350+
conflicts_pkg=$(echo $conflicts_pkg | sed -i 's/postfix//g' | xargs)
351+
fi
352+
353+
for pkg in $conflicts_pkg; do
347354
if [ ! -z "$(grep $pkg $tmpfile)" ]; then
348355
conflicts="$pkg* $conflicts"
349356
fi

install/hst-install-ubuntu.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,14 @@ check_result $? "Unable to connect to the Hestia APT repository"
317317
# Check installed packages
318318
tmpfile=$(mktemp -p /tmp)
319319
dpkg --get-selections > $tmpfile
320-
for pkg in exim4 mariadb-server apache2 nginx hestia postfix ufw; do
320+
conflicts_pkg="exim4 mariadb-server apache2 nginx hestia postfix ufw"
321+
322+
# Drop postfix from the list if exim should not be installed
323+
if [ "$exim" = 'no' ]; then
324+
conflicts_pkg=$(echo $conflicts_pkg | sed -i 's/postfix//g' | xargs)
325+
fi
326+
327+
for pkg in $conflicts_pkg; do
321328
if [ ! -z "$(grep $pkg $tmpfile)" ]; then
322329
conflicts="$pkg* $conflicts"
323330
fi

0 commit comments

Comments
 (0)