--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: uccdoors
+# Required-Start: $all
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start UCC door monitors at boot time
+# Description: Enable UCC door hardware monitor and XMPP client.
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DESC="UCC door monitors"
+NAME=uccdoors
+BASEDIR=/home/ucc/door/uccdoor
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC:"
+ echo -n " server"; start-stop-daemon --start --quiet --chuid door --background --pidfile /var/run/door-server.pid --make-pidfile --startas $BASEDIR/server.py
+ sleep 5
+ echo -n " client-xmpp"; start-stop-daemon --start --quiet --chuid door --background --pidfile /var/run/door-client-xmpp.pid --make-pidfile --startas $BASEDIR/client-xmpp.py
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC:"
+ echo -n " client-xmpp"; start-stop-daemon --stop --quiet --pidfile /var/run/door-client-xmpp.pid $BASEDIR/client-xmpp.py
+ sleep 2
+ echo -n " server"; start-stop-daemon --stop --quiet --pidfile /var/run/door-server.pid $BASEDIR/server.py
+ echo "."
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac