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.

This entry was posted in General, work and tagged , , , , , . Bookmark the permalink.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>