Supybot init script for Debian.
Sunday, April 17th, 2005Supybot 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.














