# Set root pw.
passwd
-# Post-installation reduction. (Answer "no" to GRUB question.)
+# Post-installation reduction.
dpkg-query -Wf '${Package} ${Priority}\n' | grep ' required' | sed 's/ required//' > list_white_unsorted
echo 'ifupdown' >> list_white_unsorted
echo 'isc-dhcp-client' >> list_white_unsorted
# Add user. Remove old user's config/ if it exists.
useradd -m -s /bin/bash plom
+rm /home/plom/.bashrc
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 server'
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}'
+sed -i 's/^delete = true$/delete = false/g' /home/plom/config/dotfiles_user_server/getmail/getmailrc
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
apt-get -y install cron
su plom -c "echo '0 18 * * 0 ~/config/bin/simplemail.sh ~/config/mails/update_reminder' | crontab -"
-# 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
+# Set up screen/weechat/OTR/bitlbee. Make bitlbee listen only locally.
+apt-get -y install screen weechat-plugins python-potr bitlbee
+sed -i 's/^# DaemonInterface/DaemonInterface = 127.0.0.1 # DaemonInterface/' /etc/bitlbee/bitlbee.conf
+sedtest=`grep -E '^DaemonInterface = 127.0.0.1 #' /etc/bitlbee/bitlbee.conf | wc -l | cut -d ' ' -f 1`
+if [ 0 -eq $sedtest ]; then
+ false
+fi
+cp config/systemfiles/weechat.service /etc/systemd/system/weechat.service
+systemctl enable /etc/systemd/system/weechat.service
# Clean up.
rm jessie_start_server.sh