Minor Changes to Install and Update Process

This commit is contained in:
earnolmartin 2018-05-22 10:22:25 -06:00
parent 9fed2b862a
commit a408f2f828
2 changed files with 22 additions and 18 deletions

View file

@ -1468,6 +1468,22 @@ function installAntiSpam(){
# Install Anti-Spam Software
aptgetInstall "amavisd-new" "runlevel=1" # amavisd-new install should not start the daemon immediately after installation since we haven't configured our fully qualified domain name of the server yet
# Prompt for FQDN
echo ""
echo -n "Please enter your Fully Qualified Domain Name (FQDN) for this mail server: "
read FQDNName
FQDNName=$(echo "$FQDNName" | awk '{print tolower($0)}')
if [ -z "$FQDNName" ]; then
# Just replace it with ehcpforce.tk
sed -i "s/^#\$myhostname.*/\$myhostname = \"ehcpforce.tk\";/g" "$AMAVISHOST"
sed -i "s#^\$myhostname.*#\$myhostname = \"ehcpforce.tk\";#g" "$AMAVISHOST"
else
sed -i "s/^#\$myhostname.*/\$myhostname = \"$FQDNName\";/g" "$AMAVISHOST"
sed -i "s#^\$myhostname.*#\$myhostname = \"$FQDNName\";#g" "$AMAVISHOST"
fi
# Install SpamAssassin and Clamav-Daemon
aptgetInstall "spamassassin clamav-daemon"
# Install individually incase some packages are not found
@ -1608,20 +1624,6 @@ smtp-amavis unix - - - - 2 smtp
if [ -z "$POSTFIXMASCHECK4" ]; then
sed -i "/pickup.*/a\\\t-o content_filter=" "$PostFixMaster"
fi
# Prompt for FQDN
echo ""
echo -n "Please enter your Fully Qualified Domain Name (FQDN) for this mail server: "
read FQDNName
FQDNName=$(echo "$FQDNName" | awk '{print tolower($0)}')
if [ -z "$FQDNName" ]; then
# Just replace it with ehcpforce.tk
sed -i "s/^#\$myhostname.*/\$myhostname = \"ehcpforce.tk\";/g" "$AMAVISHOST"
sed -i "s#^\$myhostname.*#\$myhostname = \"ehcpforce.tk\";#g" "$AMAVISHOST"
else
sed -i "s/^#\$myhostname.*/\$myhostname = \"$FQDNName\";/g" "$AMAVISHOST"
sed -i "s#^\$myhostname.*#\$myhostname = \"$FQDNName\";#g" "$AMAVISHOST"
fi
# Change settings for amavis deb defaults
if [ -e "$AMAVISDEBDEFAULTSCONF" ]; then

View file

@ -1337,6 +1337,12 @@ function installAntiSpam(){
# Install Anti-Spam Software
aptgetInstall "amavisd-new" "runlevel=1" # amavisd-new install should not start the daemon immediately after installation since we haven't configured our fully qualified domain name of the server yet
# Use FQDN for mail server (used by Amavis) as entered by user earlier
sed -i "s/^#\$myhostname.*/\$myhostname = \"$FQDNName\";/g" "$AMAVISHOST"
sed -i "s#^\$myhostname.*#\$myhostname = \"$FQDNName\";#g" "$AMAVISHOST"
# Install SpamAssassin and Clamav-Daemon
aptgetInstall "spamassassin clamav-daemon"
# Install individually incase some packages are not found
@ -1477,10 +1483,6 @@ smtp-amavis unix - - - - 2 smtp
if [ -z "$POSTFIXMASCHECK4" ]; then
sed -i "/pickup.*/a\\\t-o content_filter=" "$PostFixMaster"
fi
# Use FQDN for mail server (used by Amavis) as entered by user earlier
sed -i "s/^#\$myhostname.*/\$myhostname = \"$FQDNName\";/g" "$AMAVISHOST"
sed -i "s#^\$myhostname.*#\$myhostname = \"$FQDNName\";#g" "$AMAVISHOST"
# Change settings for amavis deb defaults
if [ -e "$AMAVISDEBDEFAULTSCONF" ]; then