diff options
| -rw-r--r-- | Reaktor/IRC/ircasy.py | 15 | ||||
| -rw-r--r-- | news/newsbot.py | 4 | ||||
| -rw-r--r-- | sites/omo/torrent.md | 25 | ||||
| -rw-r--r-- | sites/task.krebsco.de/README.md | 40 | 
4 files changed, 80 insertions, 4 deletions
| diff --git a/Reaktor/IRC/ircasy.py b/Reaktor/IRC/ircasy.py index 7821305f..150498dd 100644 --- a/Reaktor/IRC/ircasy.py +++ b/Reaktor/IRC/ircasy.py @@ -107,6 +107,9 @@ class asybot(asychat):      elif command == 'INVITE':        self.on_invite(prefix, command, params, rest) +    elif command == 'KICK': +      self.on_kick(prefix, command, params, rest) +      elif command == '433':        # ERR_NICKNAMEINUSE, retry with another name        _, nickname, int, _ = split('^.*[^0-9]([0-9]+)$', self.nickname) \ @@ -158,11 +161,17 @@ class asybot(asychat):    def ME(self, target, text):      self.PRIVMSG(target, ('ACTION ' + text + '')) -  def on_privmsg(self, prefix, command, params, rest): -    pass -    def on_welcome(self, prefix, command, params, rest):      self.push('JOIN %s' % ','.join(self.channels)) +  def on_kick(self, prefix, command, params, rest): +    self.log.debug(params) +    if params[-1] == self.nickname: +      for chan in params[:-1]: +        self.channels.remove(chan) + +  def on_privmsg(self, prefix, command, params, rest): +    pass +    def on_invite(self, prefix, command, params, rest):      pass diff --git a/news/newsbot.py b/news/newsbot.py index 54a2e7d2..899c5dd2 100644 --- a/news/newsbot.py +++ b/news/newsbot.py @@ -39,6 +39,7 @@ class NewsBot(asybot):      def on_invite(self, prefix, command, params, rest):          for chan in rest.split():              self.push('JOIN ' + chan) +            self.channels.append(chan)      def read_message(self, args):          try: @@ -215,6 +216,7 @@ class RssBot(asybot):      def on_invite(self, prefix, command, params, rest):          for chan in rest.split():              self.push('JOIN ' + chan) +            self.channels.append(chan)  feedfile = 'new_feeds'  url_shortener = 'http://wall' @@ -231,7 +233,7 @@ F.close()  for line in lines:      line = line.strip('\n')      linear = line.split('|') -    bot = RssBot(linear[1], linear[0], init_channels + linear[2].split(), url_shortener=url_shortener) +    bot = RssBot(linear[1], linear[0], linear[2].split(), url_shortener=url_shortener)      bot.start_rss()      bots[linear[0]] = bot diff --git a/sites/omo/torrent.md b/sites/omo/torrent.md new file mode 100644 index 00000000..61feea94 --- /dev/null +++ b/sites/omo/torrent.md @@ -0,0 +1,25 @@ +# Running torrents through socks +## Prereqs: +- qBittorrent +- winswitch (xpra) or qbittorrent-nox + +## Install +### Winswitch +see http://winswitch.org/downloads/debian-repository.html + +## Autostart (xpra) + +    # in startup script: +    export DISPLAY=:11 +    xpra start $DISPLAY +    tmux start-server +    tmux new-window -t tools:1  'ssh -q -D1234 <remote-host>' +    tmux new-window -t tools:2 'qbittorrent' +    # attach to it: +    xpra attach ssh:omo:11 + +## Autostart (nox) +see https://github.com/qbittorrent/qBittorrent/wiki/Running-qBittorrent-without-X-server + +## Lessons learned +- transmission sucks (no proxy support diff --git a/sites/task.krebsco.de/README.md b/sites/task.krebsco.de/README.md new file mode 100644 index 00000000..c6fd2b0f --- /dev/null +++ b/sites/task.krebsco.de/README.md @@ -0,0 +1,40 @@ +# task.krebsco.de +a taskd server deployment + +# Installation + +  yaourt -S taskd +  cp /usr/share/taskd/pki/generate.client /var/lib/taskd + +# configuration +taskd uses pki for login + +    systemctl enable taskd +    systemctl start taskd +    export TASKDDATA=/var/lib/taskd +    taskd add org Krebs +    taskd config --force pid.file $TASKDDIR/taskd.pid +    taskd config --force log $TASKDDIR/taskd.log +    taskd config --force client.allow '^task [2-9],^taskd,^libtaskd' + +# add new client +for a new client we need to create certificates: +     +    # on server +    cd /var/lib/taskd +    ./generate.client username +    # give new certs to user +    curl -F'p=username.cert.pem' http://paste +    curl -F'p=username.key.pem' http://paste +    curl -F'p=ca.cert.pem' http://paste +    taskd add user krebs username +    # outputs <uid> + +    # on client +    mkdir ~/.task +    curl http://paste/abcde > username.cert.pem +    curl http://paste/efghi > username.key.pem +    curl http://paste/jklmn > ca.cert.pem +    task config taskd.server task.krebsco.de:53589 +    task config taskd.credentials 'krebs/makefu/<uid>' +    task sync init | 
