home · contact · privacy
On server, replace screen/irssi with tmux/weechat/bitlbee.
authorChristian Heller <c.heller@plomlompom.de>
Sat, 17 Oct 2015 11:53:08 +0000 (13:53 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 17 Oct 2015 11:53:08 +0000 (13:53 +0200)
bin/weechat-wrapper.sh [new file with mode: 0755]
dotfiles_user_server/bashrc
dotfiles_user_server/weechatrc [new file with mode: 0644]
jessie_start_server.sh
mails/server_postinstall_finished
mails/weechat_restart_reminder [new file with mode: 0644]
systemfiles/weechat.service [new file with mode: 0644]

diff --git a/bin/weechat-wrapper.sh b/bin/weechat-wrapper.sh
new file mode 100755 (executable)
index 0000000..333c9d1
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Enforce ~/.weechatrc as sole persistent weechat config file.
+~/config/bin/simplemail.sh ~/config/mails/weechat_restart_reminder
+rm -rf ~/.weechat/
+WEECHATCONF=`tr '\n' ';' < ~/.weechatrc`
+weechat -r "$WEECHATCONF"
+rm -rf ~/.weechat/
index 2f21e2711618463d2b95550c68d543b2f06fe995..8037b1bf89561412b3c31f19789981554b5a98d5 100644 (file)
@@ -3,6 +3,9 @@
 # Fancy colors for ls.
 alias ls="ls --color=auto"
 
+# Wrapper for weechat to force local config file on it anew on each run.
+alias weechat="~/config/bin/weechat-wrapper.sh"
+
 # Blue prompt with time.
 PS1="\[\e[1;34m\][\\t \\u@\\h \\w]$\[\e[m\] "
 PS2="\[\e[1;34m\]>\[\e[m\] "
diff --git a/dotfiles_user_server/weechatrc b/dotfiles_user_server/weechatrc
new file mode 100644 (file)
index 0000000..3b7fe91
--- /dev/null
@@ -0,0 +1,10 @@
+/set logger.file.path ~/weechatlogs
+/set logger.file.flush_delay 0
+/script install otr.py
+/set weechat.bar.status.items "[time],[buffer_last_number],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,[lag],[hotlist],completion,scroll,[otr]"
+/server add localhost localhost
+/connect localhost
+/server del freenode
+/server add freenode irc.freenode.net -nicks=plomlompom,plomlomp0m,ploml0mp0m,pl0ml0mp0m -realname="Christian Heller" 
+#/server add freenode irc.freenode.net -nicks=plomlompom,plomlomp0m,ploml0mp0m,pl0ml0mp0m -realname="Christian Heller" -autojoin=#nodrama.de,#twitter.de,#freie-gesellschaft,#dumme-gesellschaft
+/connect freenode
index a764ef5b6b8ec1cb4608b1737ba67212d3426bfb..e58f76093c1da0ef02ff95fad17f75af5d5f742e 100755 (executable)
@@ -103,16 +103,24 @@ 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.
-apt-get -y install screen
+# Set up tmux.
+apt-get -y install tmux
 
-# Set up ping.
-apt-get -y install iputils-ping
+# Set up weechat, OTR, bitlbee.
+apt-get install weechat-plugins python-potr bitlbee
+cp config/systemfiles/weechat /etc/systemd/system/weechat.service
+systemctl enable /etc/systemd/system/weechat.service
 
+# 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
+#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
index 45b82c1e6b8c2805ebf2126b57998714f535cb01..d5d97413747e668f2e297e434a2e80feeb1450f2 100644 (file)
@@ -11,3 +11,9 @@ perform the following tasks:
 - run (as root) config/setup_opendkim.sh $selector to set up system for DKIM key
   signing, with a second parameter $keyfile if a key already exists; without
   second parameter, this will generate a new key and print the DNS record to add
+
+- in the tmux weechat/bitlbee session (run "tmux attach"), switch to the
+  &bitlbee channel, register with a password ("register", "/oper . [password]"),
+  and set up Jabber account with password ("account add jabber
+  plomlompom@jabber.ccc.de", "/oper . [password]"), then activate it ("account
+  on")
diff --git a/mails/weechat_restart_reminder b/mails/weechat_restart_reminder
new file mode 100644 (file)
index 0000000..3aecea2
--- /dev/null
@@ -0,0 +1,5 @@
+[SYSADMIN] weechat restarted, re-identify!
+
+Your weechat was restarted, so don't forget to re-identify on freenode to
+nickserv via "/msg nickserv identify [password]", and on bitlbee by joining
+&bitlbee, "identify", "/oper . [password]", and "account on".
diff --git a/systemfiles/weechat.service b/systemfiles/weechat.service
new file mode 100644 (file)
index 0000000..fbf4b78
--- /dev/null
@@ -0,0 +1,12 @@
+# /etc/systemd/system/weechat.service
+
+[Unit]
+Description=tmux weechat
+
+[Service]
+Type=forking
+User=plom
+ExecStart=/usr/bin/tmux new-session -d '~/config/bin/weechat-wrapper.sh'
+
+[Install]
+WantedBy=multi-user.target