3 # Provides: irspy-zebra
4 # Required-Start: $local_fs $remote_fs $network $named $time
5 # Required-Stop: $local_fs $remote_fs
6 # Default-Start: 2 3 4 5
8 # Short-Description: Controls the irspy-zebra daemon
9 # Description: Controls the ID IRSpy Zebra server daemon
10 # /usr/bin/zebrasrv-2.0 .
14 # This is a startup/shutdown script for IRSpy's Zebra server, suitable
15 # for use in a SysV-style init directory such as /etc/init.d (on
16 # Debian systems) and /etc/rc.d/init.d (on Red Hat systems), like this:
19 # sudo ln -s .../irspy/zebra/init-script irspy-zebra
20 # sudo /etc/init.d/irspy-zebra start
22 # You may need to tweak it to suit your system's paths.
25 # zebrasrv-2.0 may be in /usr/local/bin, hence this slight security hole
26 PATH=/bin:/usr/bin:/usr/local/bin/
27 logfile=/var/log/irspy-zebra.log
28 pidfile=/var/run/irspy-zebra.pid
31 nigiri | xeno | rafa | test) IRSPYDIR=/usr/local/src/git/irspy/;;
32 shawarma|kafta) IRSPYDIR=/home/mike/cvs/irspy/;;
33 berwick ) IRSPYDIR=/home/indexdata/irspy/ ;;
35 your-development-machine )
36 IRSPYDIR=/home/foobar/indexdata/irspy/
37 logfile=$IRSPYDIR/irspy-zebra
38 pidfile=$IRSPYDIR/irspy-zebra.pid
40 *) echo "$0: unsupported host `hostname`" >&2
46 if [ -f $pidfile ]; then
47 echo "IRSpy's Zebra seems to be already running"
50 echo "Starting IRSpy's Zebra"
51 # Let log rotation take care of backups
52 #test -f $logfile && mv -f $logfile $logfile.old
54 zebrasrv-2.0 -f $(pwd)/yazserver.xml < /dev/null >> $logfile 2>&1 &
59 if [ ! -f $pidfile ]; then
60 echo "IRSpy's Zebra does not seem to be running"
63 echo "Stopping IRSpy's Zebra"
71 echo "Usage: $0 start|stop|restart" >&2