Supybot init script for Debian.

Supybot is a neat little IRC bot written in Python. I had been looking for a bot to do some logging of my favorite IRC channel (#nblug on irc.nblug.org). The setup was pretty easy and the documentation is nice, but the one thing I didn’t find was an init script, so I modified one from an existing blootbot init script.


#! /bin/sh
#
# supybot init script
#
#
# Cobbled together from the blootbot init script.
#

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/supybot
NAME=supybot
DESC=supybot

test -f $DAEMON || exit 0

set -e

case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/supybot/$NAME.pid \
--chuid supybot --exec $DAEMON -- --daemon /etc/supybot/nibler.conf
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /var/run/supybot/$NAME.pid \
--oknodo --exec /usr/bin/python
echo "$NAME."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac

exit 0

Note: I am still a big Mandriva weenie, but the server this bot runs on is a Debian box.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
    None Found

You can leave a response, or trackback from your own site.

3 Responses to “Supybot init script for Debian.”

  1. David Llopis Says:

    I just wrote up a Debian script and posted it to

    The way to properly daemonize supybot isn’t really documented, so hopefully using this will save people a lot of hassle.

  2. David Llopis Says:

    Oops, my link got eaten by an HTML filter:

    http://sourceforge.net/tracker/?func=detail&aid=2795957&group_id=58965&atid=489449

  3. Tim Abell Says:

    Thanks for your help.

    Used your script here: http://timwise.blogspot.com/2009/11/getting-supybot-to-announce-new.html

Leave a Reply