From e076796196cbad4e49451c266c5561204789f2a2 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Sun, 25 Oct 2015 19:57:13 +0100
Subject: [PATCH] Make bitlbee listen only locally.

---
 jessie_start_server.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/jessie_start_server.sh b/jessie_start_server.sh
index 244167d..e4ed172 100755
--- a/jessie_start_server.sh
+++ b/jessie_start_server.sh
@@ -103,8 +103,13 @@ service postfix restart
 apt-get -y install cron
 su plom -c "echo '0 18 * * 0 ~/config/bin/simplemail.sh ~/config/mails/update_reminder' | crontab -"
 
-# Set up screen, weechat, OTR, bitlbee.
+# 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
 
-- 
2.30.2