home · contact · privacy
Fix bug in string replacement introduced in previous commit.
[config] / jessie_postinstall.sh
index a14dcce8b6623811f273249e158c658e1dcf8b3f..2d01b518c6a979f4869306a863e2199aa56d5205 100755 (executable)
@@ -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