From 3744f5ff8470d43b8c89d1df36c9521f047f127b Mon Sep 17 00:00:00 2001 From: bprieshof Date: Thu, 17 Oct 2019 18:07:04 +0200 Subject: [PATCH] Added check for postfix cheking if postfix already was installed by the system and if yes it wil be removed to prevent config conflicts --- NGINX-Installer.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NGINX-Installer.sh b/NGINX-Installer.sh index 76f8ef2..25a2c04 100644 --- a/NGINX-Installer.sh +++ b/NGINX-Installer.sh @@ -88,6 +88,9 @@ sed -i 's/'rtag'/'"${phpver}"'/g' /etc/php/"$phpver"/fpm/pool.d/www.conf # Postfix # ##-------------## +#cheking if postfix already was installed by the system and if yes it wil be removed to prevent config conflicts +if dpkg-query -Wf'${db:Status-abbrev}' postfix 2>/dev/null | grep -q '^i'; then apt purge -y postfix; fi + debconf-set-selections <<< "postfix postfix/mailname string $domain" debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" apt install -y mailutils