echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/99mindeps
echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf.d/99mindeps
+# Set hostname and FQDN.
+echo 'plomlompom' > /etc/hostname
+hostname 'plomlompom'
+echo '127.0.0.1 localhost' > /etc/hosts
+ip=`hostname -I`
+echo "$ip plomlompom.com plomlompom" >> /etc/hosts
+
# Call dhclient on startup.
cat > /etc/systemd/system/dhclient.service << EOF
[Unit]
useradd -m -s /bin/bash plom
rm -rf /home/plom/config
su - plom -c 'git clone http://github.com/plomlompom/config /home/plom/config'
-su plom -c '/home/plom/config/symlink.sh'
+su plom -c '/home/plom/config/symlink.sh server'
# Set up editor.
apt-get -y install vim
# Set up openssh-server.
apt-get -y install openssh-server
+# Set up mail system.
+su plom -c 'mkdir -p /home/plom/mail/'
+su plom -c 'mkdir -p /home/plom/mail/inbox/{cur,new,tmp}'
+su plom -c 'mkdir -p /home/plom/mail/new_inbox/{cur,new,tmp}'
+DEBIAN_FRONTEND=noninteractive apt-get -y install getmail4 procmail mutt postfix maildrop
+cp config/systemfiles/main.cf /etc/postfix/main.cf
+cp config/systemfiles/aliases /etc/aliases
+newaliases
+service postfix restart
+
+# Set up screen.
+apt-get -y install screen
+
+# Set up ping.
+apt-get -y install iputils-ping
+
+# Set up irssi.
+apt-get -y install irssi
+cp config/systemfiles/irssi.service /etc/systemd/system/irssi.service
+systemctl enable /etc/systemd/system/irssi.service
+
# Clean up.
rm jessie_start_server.sh
+# Send instructions mail.
+config/bin/simplemail.sh config/mails/server_postinstall_finished
+
# Set password for user.
passwd plom
+
+# Finalize everything with a reboot.
+reboot