X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=zebra%2Finit-script;h=658013ef5292374940c8cb5718f8de7ee8cd68d2;hp=4f9b223773736d41866f402618231fe4cfa1f663;hb=ffa668f5cfcace8660285e58d2b777c83eeb35f2;hpb=5cb7ba44fc75fa61c3989e72d2831564a843283d diff --git a/zebra/init-script b/zebra/init-script index 4f9b223..658013e 100755 --- a/zebra/init-script +++ b/zebra/init-script @@ -1,6 +1,5 @@ #! /bin/sh -# $Id: init-script,v 1.8 2009-04-15 18:16:46 wosch Exp $ # # This is a startup/shutdown script for IRSpy's Zebra server, suitable # for use in a SysV-style init directory such as /etc/init.d (on @@ -15,14 +14,16 @@ # zebrasrv-2.0 may be in /usr/local/bin, hence this slight security hole PATH=/bin:/usr/bin:/usr/local/bin/ -logfile=/var/log/irspy-zebra +logfile=/var/log/irspy-zebra.log pidfile=/var/run/irspy-zebra.pid case "`hostname`" in - xeno|rafa|test) IRSPYDIR=/usr/local/src/cvs/irspy/;; + nigiri | xeno | rafa | test) IRSPYDIR=/usr/local/src/git/irspy/;; shawarma|kafta) IRSPYDIR=/home/mike/cvs/irspy/;; - us2| us2.*) - IRSPYDIR=/home/wosch/indexdata/irspy/ + berwick ) IRSPYDIR=/home/indexdata/irspy/ ;; + + your-development-machine ) + IRSPYDIR=/home/foobar/indexdata/irspy/ logfile=$IRSPYDIR/irspy-zebra pidfile=$IRSPYDIR/irspy-zebra.pid ;; @@ -40,7 +41,7 @@ case "$1" in # Let log rotation take care of backups #test -f $logfile && mv -f $logfile $logfile.old ( cd $IRSPYDIR/zebra - zebrasrv-2.0 -f yazserver.xml < /dev/null >> $logfile 2>&1 & + zebrasrv-2.0 -f $(pwd)/yazserver.xml < /dev/null >> $logfile 2>&1 & echo $! > $pidfile ) ;; @@ -60,3 +61,4 @@ case "$1" in echo "Usage: $0 start|stop|restart" >&2 ;; esac +