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.
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