3 # $Id: init-script,v 1.4 2007-02-28 17:50:22 mike Exp $
5 # This is a startup/shutdown script for IRSpy's Zebra server, suitable
6 # for use in a SysV-style init directory such as /etc/init.d (on
7 # Debian systems) and /etc/rc.d/init.d (on Red Hat systems), like this:
10 # sudo ln -s /usr/local/src/cvs/irspy/zebra/init-script irspy-zebra
11 # sudo /etc/init.d/irspy-zebra start
13 # You may need to tweak it to suit your system's paths.
16 # zebrasrv-2.0 may be in /usr/local/bin, hence this slight security hole
17 PATH=/bin:/usr/bin:/usr/local/bin/
18 logfile=/var/log/irspy-zebra
19 pidfile=/var/run/irspy-zebra.pid
23 if [ -f $pidfile ]; then
24 echo "IRSpy's Zebra seems to be already running"
27 echo "Starting IRSpy's Zebra"
28 # Let log rotation take care of backups
29 #test -f $logfile && mv -f $logfile $logfile.old
30 ( cd /usr/local/src/cvs/irspy/zebra
31 zebrasrv-2.0 -f yazserver.xml < /dev/null >> $logfile 2>&1 &
36 if [ ! -f $pidfile ]; then
37 echo "IRSpy's Zebra does not seem to be running"
40 echo "Stopping IRSpy's Zebra"
48 echo "Usage: $0 start|stop|restart" >&2