X-Git-Url: https://plomlompom.com/repos/bar%20baz.html?a=blobdiff_plain;f=jessie_postinstall.sh;h=2d01b518c6a979f4869306a863e2199aa56d5205;hb=00ca69c32a596e02eeafd60a9a5008d39e114eca;hp=a14dcce8b6623811f273249e158c658e1dcf8b3f;hpb=7e65ff0da2133434d1bf0bcec8b5d496b0e1cc64;p=config diff --git a/jessie_postinstall.sh b/jessie_postinstall.sh index a14dcce..2d01b51 100755 --- a/jessie_postinstall.sh +++ b/jessie_postinstall.sh @@ -57,7 +57,7 @@ echo $hostname > /etc/hostname hostname $hostname if [ "$1" = "server" ]; then echo '127.0.0.1 localhost' > /etc/hosts - ip=`hostname -I` + ip=`hostname -I | cut -d " " -f 1` echo "$ip $2 $hostname" >> /etc/hosts # Call dhclient on startup. @@ -182,6 +182,7 @@ if [ "$1" = "server" ]; then DEBIAN_FRONTEND=noninteractive apt-get -y install getmail4 procmail mutt \ postfix maildrop cp config/systemfiles/main.cf /etc/postfix/main.cf + sed -i 's/HOSTNAME/'$2'/g' /etc/postfix/main.cf cp config/systemfiles/aliases /etc/aliases newaliases service postfix restart