Set mailname at the same time as hostname

This commit is contained in:
Bob Mottram 2016-10-23 16:53:23 +01:00
parent 4406b117ea
commit 2f5deb0c01
2 changed files with 1 additions and 2 deletions

View File

@ -671,8 +671,6 @@ function install_email {
return return
fi fi
echo "$DEFAULT_DOMAIN_NAME" > /etc/mailname
apt-get -y remove postfix apt-get -y remove postfix
apt-get -y install exim4 sasl2-bin swaks libnet-ssleay-perl procmail xinetd apt-get -y install exim4 sasl2-bin swaks libnet-ssleay-perl procmail xinetd

View File

@ -184,6 +184,7 @@ function set_hostname {
echo "$DEFAULT_DOMAIN_NAME" > /etc/hostname echo "$DEFAULT_DOMAIN_NAME" > /etc/hostname
hostname $DEFAULT_DOMAIN_NAME hostname $DEFAULT_DOMAIN_NAME
echo "$DEFAULT_DOMAIN_NAME" > /etc/mailname
if grep -q "127.0.1.1" /etc/hosts; then if grep -q "127.0.1.1" /etc/hosts; then
sed -i "s/127.0.1.1.*/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts sed -i "s/127.0.1.1.*/127.0.1.1 $DEFAULT_DOMAIN_NAME/g" /etc/hosts