wiki:bender

Version 8 (modified by Jamie McClelland, 7 years ago) ( diff )

--

superbender the IRC notification daemon

superbender has taken over from our faithful bot bender. It monitors RSS feeds and posts them in our chat.

superbender lives on jojobe, runs as the user bender and fully resides in /home/bender.

It runs sopel and the sopel-rss module.

It runs via systemd (/etc/systemd/system/bender.service) and can be restarted with:

systemctl restart superbender

superbender's config files are in jojobe:/home/bender/.sopel.

It was setup by running the following commands from #mayfirst after it connected:

.rss add #mayfirst tickets https://support.mayfirst..org/timeline?ticket=on&ticket_details=on&sensitive_activity=on&max=10&daysback=1&format=rss
.rss formats tickets f=fl+fatl
.rss add #mayfirst nagios https://monitor.mayfirst.org/rss/all.xml
.rss add #mayfirst service https://status.mayfirst.org/rss.xml
.rss add #mayfirst wiki https://support.mayfirst.org/timeline?max=10&wiki=on&daysback=1&format=rss

You can control it if you add your irc nick to jojobe:/home/bender/.sopel/default.cfg (the owner line) and then restart:

systemctl restart superbender

Upgrading

Now, with jojobe running jessie, sopel was installed by hand and dropped into /home/bender/. A symlink was created from "sopel" to the actual directory which has the version number as part of the name. To upgrade, download a new version and re-create the symlink.

When jojobe is upgraded to stretch, we can pull in the debian package, move the configuration directory from /home/bender/.sopel to /etc/ and probably even purge the user bender.

Maintenance

If superbender is not reporting on a feed, check journalctl -u superbender and you might find errors like:

Sep 22 10:12:44 jojobe sopel.py[17675]: OSError: [Errno 9] Bad file descriptor
Sep 22 10:12:44 jojobe sopel.py[17675]: Traceback (most recent call last):
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/tools/jobs.py", line 142, in _call
Sep 22 10:12:44 jojobe sopel.py[17675]: func(self.bot)
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/modules/rss.py", line 1101, in _rss_update
Sep 22 10:12:44 jojobe sopel.py[17675]: _feed_update(bot, feedreader, feedname, False)
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/modules/rss.py", line 822, in _feed_update
Sep 22 10:12:44 jojobe sopel.py[17675]: bot.say(message, channel)
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/bot.py", line 335, in say
Sep 22 10:12:44 jojobe sopel.py[17675]: self.write(('PRIVMSG', recipient), text)
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/bot.py", line 163, in write
Sep 22 10:12:44 jojobe sopel.py[17675]: irc.Bot.write(self, args, text=text)
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/irc.py", line 149, in write
Sep 22 10:12:44 jojobe sopel.py[17675]: self.send(temp.encode('utf-8'))
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/home/bender/sopel-6.5.0/sopel/irc.py", line 263, in _ssl_send
Sep 22 10:12:44 jojobe sopel.py[17675]: result = self.socket.send(data)
Sep 22 10:12:44 jojobe sopel.py[17675]: File "/usr/lib/python3.4/ssl.py", line 689, in send
Sep 22 10:12:44 jojobe sopel.py[17675]: return socket.send(self, data, flags)
Sep 22 10:12:44 jojobe sopel.py[17675]: OSError: [Errno 9] Bad file descriptor
Sep 22 10:12:44 jojobe sopel.py[17675]: Got quit signal, shutting down.
Sep 22 10:12:44 jojobe sopel.py[17675]: ERROR:sopel.modules.sopel.irc:ERROR recieved from server: Closing Link: 81.95.xy.lix (Quit: Closing)

The errors don't seem to specify which feed it is having trouble with. However, you can remove and re-add feeds via irc:

.rss del <feedname>

And then re-add using the command above.

Note: See TracWiki for help on using the wiki.