File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -343,7 +343,14 @@ check_result $? "Unable to connect to the Hestia APT repository"
343343# Check installed packages
344344tmpfile=$( mktemp -p /tmp)
345345dpkg --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
Original file line number Diff line number Diff line change @@ -317,7 +317,14 @@ check_result $? "Unable to connect to the Hestia APT repository"
317317# Check installed packages
318318tmpfile=$( mktemp -p /tmp)
319319dpkg --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
You can’t perform that action at this time.
0 commit comments