--- /dev/null
+#! /bin/sh
+# $Id: zebrasrv,v 1.1 2003-05-19 21:35:02 adam Exp $
+# Start and stop idzebra script for Debian.
+
+test -x /usr/bin/zebrasrv || exit 0
+
+dirs="/var/lib/idzebra"
+uid=nobody
+
+case "$1" in
+ start)
+ for d in $dirs; do
+ if [ ! -d $d ]; then
+ mkdir $d
+ fi
+ done
+ echo -n "Starting IDZebra server: zebrasrv"
+ for d in $dirs; do
+ start-stop-daemon --start --quiet --background --pidfile $d/zebrasrv.pid --exec /usr/bin/zebrasrv -- -w $d -u $uid -l log tcp:@:210
+ done
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping IDZebra server: zebrasrv"
+ for d in $dirs; do
+ start-stop-daemon --stop --quiet --oknodo --pidfile $d/zebrasrv.pid
+ done
+ echo "."
+ ;;
+
+ reload|force-reload)
+ echo -n "Reloading IDZebra server's configuration"
+ for d in $dirs; do
+ start-stop-daemon --stop --signal 1 --quiet --background --oknodo --pidfile $d/zebrasrv.pid --exec /usr/bin/zebrasrv -- -w $d -u $uid -l log tcp:@:210
+ done
+ echo "."
+ ;;
+
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+
+ *)
+ echo "Usage: /etc/init.d/zebrasrv {start|stop|reload|force-reload|restart}"
+ exit 1
+esac
+
+exit 0